Lines Matching +full:- +full:- +full:name

15  * and make the properties non-public. The trait will preserve public access
23 * $this->deprecatePublicProperty( 'bar', '1.21', __CLASS__ );
28 * $foo->bar; // works but logs a warning
36 * List of deprecated properties, in <property name> => <class> format
37 * where <class> is the the name of the class defining the property
48 * @param string $property The name of the property.
49 * @param null $class name of the class defining the property
56 $this->deprecatedPublicProperties[$property] = $class ?: get_class($this);
59 public function __get($name) argument
61 if (isset($this->deprecatedPublicProperties[$name])) {
62 $class = $this->deprecatedPublicProperties[$name];
63 DebugHelper::dbgDeprecatedProperty($class, $name);
64 return $this->$name;
67 $qualifiedName = get_class() . '::$' . $name;
68 if ($this->deprecationHelperGetPropertyOwner($name)) {
69 // Someone tried to access a normal non-public property. Try to behave like PHP would.
70 throw new \RuntimeException("Cannot access non-public property $qualifiedName");
72 // Non-existing property. Try to behave like PHP would.
78 public function __set($name, $value) argument
80 if (isset($this->deprecatedPublicProperties[$name])) {
81 $class = $this->deprecatedPublicProperties[$name];
82 DebugHelper::dbgDeprecatedProperty($class, $name);
83 $this->$name = $value;
87 $qualifiedName = get_class() . '::$' . $name;
88 if ($this->deprecationHelperGetPropertyOwner($name)) {
89 // Someone tried to access a normal non-public property. Try to behave like PHP would.
90 throw new \RuntimeException("Cannot access non-public property $qualifiedName");
92 // Non-existing property. Try to behave like PHP would.
93 $this->$name = $value;
98 * Like property_exists but also check for non-visible private properties and returns which
107 // The class name is not necessarily correct here but getting the correct class
108 // name would be expensive, this will work most of the time and getting it
115 // Since PHP triggers an error on public access of non-public properties but happily
123 $classname = substr($obfuscatedProp, 1, -strlen($obfuscatedPropTail));