Skip to content

Commit e04bd56

Browse files
committed
Nice idea, but bad in execution
1 parent a31ae60 commit e04bd56

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

src/Element/ElementHolder.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,6 @@ public function get($key, $default = null)
4545
return parent::get($key, $default);
4646
}
4747

48-
/**
49-
* __get dynamically retrieves the value of an attribute, a safe object
50-
* is returned for missing keys to avoid indirect modification errors.
51-
* @param string $key
52-
* @return mixed
53-
*/
54-
public function __get($key)
55-
{
56-
$result = $this->get($key);
57-
58-
if ($result === null) {
59-
return new class {
60-
public function __get($k) { return $this; }
61-
public function __set($k, $v) {}
62-
};
63-
}
64-
65-
return $result;
66-
}
67-
6848
/**
6949
* getIterator for the elements.
7050
*/

0 commit comments

Comments
 (0)