/var/www/vhosts/nabawater/vendor/yiisoft/yii2/base
NameSizeModeActions
Action.php38090644editdlrm
ActionEvent.php12800644editdlrm
ActionFilter.php52060644editdlrm
Application.php239340644editdlrm
Arrayable.php39570644editdlrm
ArrayableTrait.php96200644editdlrm
ArrayAccessTrait.php23860644editdlrm
BaseObject.php105700644editdlrm
Behavior.php32080644editdlrm
BootstrapInterface.php19920644editdlrm
Component.php278760644editdlrm
Configurable.php10500644editdlrm
Controller.php199290644editdlrm
DynamicContentAwareInterface.php12900644editdlrm
DynamicContentAwareTrait.php24270644editdlrm
DynamicModel.php72260644editdlrm
ErrorException.php41430644editdlrm
ErrorHandler.php123060644editdlrm
Event.php116510644editdlrm
Exception.php6250644editdlrm
ExitException.php9980644editdlrm
InlineAction.php19450644editdlrm
InvalidArgumentException.php5650644editdlrm
InvalidCallException.php5470644editdlrm
InvalidConfigException.php5450644editdlrm
InvalidParamException.php6310644editdlrm
InvalidRouteException.php5250644editdlrm
InvalidValueException.php5750644editdlrm
Model.php398360644editdlrm
ModelEvent.php5380644editdlrm
Module.php280050644editdlrm
NotSupportedException.php5460644editdlrm
Object.php10420644editdlrm
Request.php31500644editdlrm
Response.php11170644editdlrm
Security.php318930644editdlrm
StaticInstanceInterface.php10080644editdlrm
StaticInstanceTrait.php10780644editdlrm
Theme.php67120644editdlrm
UnknownClassException.php5270644editdlrm
UnknownMethodException.php5560644editdlrm
UnknownPropertyException.php5490644editdlrm
UserException.php4360644editdlrm
View.php217920644editdlrm
ViewContextInterface.php6570644editdlrm
ViewEvent.php10960644editdlrm
ViewNotFoundException.php5290644editdlrm
ViewRenderer.php8560644editdlrm
Widget.php106090644editdlrm
WidgetEvent.php8380644editdlrm
Edit: /var/www/vhosts/nabawater/vendor/yiisoft/yii2/base/BaseObject.php (10570B)
_label; * } * * public function setLabel($value) * { * $this->_label = $value; * } * ``` * * Property names are *case-insensitive*. * * A property can be accessed like a member variable of an object. Reading or writing a property will cause the invocation * of the corresponding getter or setter method. For example, * * ```php * // equivalent to $label = $object->getLabel(); * $label = $object->label; * // equivalent to $object->setLabel('abc'); * $object->label = 'abc'; * ``` * * If a property has only a getter method and has no setter method, it is considered as *read-only*. In this case, trying * to modify the property value will cause an exception. * * One can call [[hasProperty()]], [[canGetProperty()]] and/or [[canSetProperty()]] to check the existence of a property. * * Besides the property feature, BaseObject also introduces an important object initialization life cycle. In particular, * creating an new instance of BaseObject or its derived class will involve the following life cycles sequentially: * * 1. the class constructor is invoked; * 2. object properties are initialized according to the given configuration; * 3. the `init()` method is invoked. * * In the above, both Step 2 and 3 occur at the end of the class constructor. It is recommended that * you perform object initialization in the `init()` method because at that stage, the object configuration * is already applied. * * In order to ensure the above life cycles, if a child class of BaseObject needs to override the constructor, * it should be done like the following: * * ```php * public function __construct($param1, $param2, ..., $config = []) * { * ... * parent::__construct($config); * } * ``` * * That is, a `$config` parameter (defaults to `[]`) should be declared as the last parameter * of the constructor, and the parent implementation should be called at the end of the constructor. * * @author Qiang Xue * @since 2.0.13 */ class BaseObject implements Configurable { /** * Returns the fully qualified name of this class. * @return string the fully qualified name of this class. * @deprecated since 2.0.14. On PHP >=5.5, use `::class` instead. */ public static function className() { return get_called_class(); } /** * Constructor. * * The default implementation does two things: * * - Initializes the object with the given configuration `$config`. * - Call [[init()]]. * * If this method is overridden in a child class, it is recommended that * * - the last parameter of the constructor is a configuration array, like `$config` here. * - call the parent implementation at the end of the constructor. * * @param array $config name-value pairs that will be used to initialize the object properties */ public function __construct($config = []) { if (!empty($config)) { Yii::configure($this, $config); } $this->init(); } /** * Initializes the object. * This method is invoked at the end of the constructor after the object is initialized with the * given configuration. */ public function init() { } /** * Returns the value of an object property. * * Do not call this method directly as it is a PHP magic method that * will be implicitly called when executing `$value = $object->property;`. * @param string $name the property name * @return mixed the property value * @throws UnknownPropertyException if the property is not defined * @throws InvalidCallException if the property is write-only * @see __set() */ public function __get($name) { $getter = 'get' . $name; if (method_exists($this, $getter)) { return $this->$getter(); } elseif (method_exists($this, 'set' . $name)) { throw new InvalidCallException('Getting write-only property: ' . get_class($this) . '::' . $name); } throw new UnknownPropertyException('Getting unknown property: ' . get_class($this) . '::' . $name); } /** * Sets value of an object property. * * Do not call this method directly as it is a PHP magic method that * will be implicitly called when executing `$object->property = $value;`. * @param string $name the property name or the event name * @param mixed $value the property value * @throws UnknownPropertyException if the property is not defined * @throws InvalidCallException if the property is read-only * @see __get() */ public function __set($name, $value) { $setter = 'set' . $name; if (method_exists($this, $setter)) { $this->$setter($value); } elseif (method_exists($this, 'get' . $name)) { throw new InvalidCallException('Setting read-only property: ' . get_class($this) . '::' . $name); } else { throw new UnknownPropertyException('Setting unknown property: ' . get_class($this) . '::' . $name); } } /** * Checks if a property is set, i.e. defined and not null. * * Do not call this method directly as it is a PHP magic method that * will be implicitly called when executing `isset($object->property)`. * * Note that if the property is not defined, false will be returned. * @param string $name the property name or the event name * @return bool whether the named property is set (not null). * @see http://php.net/manual/en/function.isset.php */ public function __isset($name) { $getter = 'get' . $name; if (method_exists($this, $getter)) { return $this->$getter() !== null; } return false; } /** * Sets an object property to null. * * Do not call this method directly as it is a PHP magic method that * will be implicitly called when executing `unset($object->property)`. * * Note that if the property is not defined, this method will do nothing. * If the property is read-only, it will throw an exception. * @param string $name the property name * @throws InvalidCallException if the property is read only. * @see http://php.net/manual/en/function.unset.php */ public function __unset($name) { $setter = 'set' . $name; if (method_exists($this, $setter)) { $this->$setter(null); } elseif (method_exists($this, 'get' . $name)) { throw new InvalidCallException('Unsetting read-only property: ' . get_class($this) . '::' . $name); } } /** * Calls the named method which is not a class method. * * Do not call this method directly as it is a PHP magic method that * will be implicitly called when an unknown method is being invoked. * @param string $name the method name * @param array $params method parameters * @throws UnknownMethodException when calling unknown method * @return mixed the method return value */ public function __call($name, $params) { throw new UnknownMethodException('Calling unknown method: ' . get_class($this) . "::$name()"); } /** * Returns a value indicating whether a property is defined. * * A property is defined if: * * - the class has a getter or setter method associated with the specified name * (in this case, property name is case-insensitive); * - the class has a member variable with the specified name (when `$checkVars` is true); * * @param string $name the property name * @param bool $checkVars whether to treat member variables as properties * @return bool whether the property is defined * @see canGetProperty() * @see canSetProperty() */ public function hasProperty($name, $checkVars = true) { return $this->canGetProperty($name, $checkVars) || $this->canSetProperty($name, false); } /** * Returns a value indicating whether a property can be read. * * A property is readable if: * * - the class has a getter method associated with the specified name * (in this case, property name is case-insensitive); * - the class has a member variable with the specified name (when `$checkVars` is true); * * @param string $name the property name * @param bool $checkVars whether to treat member variables as properties * @return bool whether the property can be read * @see canSetProperty() */ public function canGetProperty($name, $checkVars = true) { return method_exists($this, 'get' . $name) || $checkVars && property_exists($this, $name); } /** * Returns a value indicating whether a property can be set. * * A property is writable if: * * - the class has a setter method associated with the specified name * (in this case, property name is case-insensitive); * - the class has a member variable with the specified name (when `$checkVars` is true); * * @param string $name the property name * @param bool $checkVars whether to treat member variables as properties * @return bool whether the property can be written * @see canGetProperty() */ public function canSetProperty($name, $checkVars = true) { return method_exists($this, 'set' . $name) || $checkVars && property_exists($this, $name); } /** * Returns a value indicating whether a method is defined. * * The default implementation is a call to php function `method_exists()`. * You may override this method when you implemented the php magic method `__call()`. * @param string $name the method name * @return bool whether the method is defined */ public function hasMethod($name) { return method_exists($this, $name); } }