PHP Класс yii\base\Object

Наследование: implements Configurable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__call ( string $name, array $params ) : mixed Calls the named method which is not a class method.
__construct ( array $config = [] ) Constructor.
__get ( string $name ) : mixed Returns the value of an object property.
__isset ( string $name ) : boolean Checks if a property is set, i.e. defined and not null.
__set ( string $name, mixed $value ) Sets value of an object property.
__unset ( string $name ) Sets an object property to null.
canGetProperty ( string $name, boolean $checkVars = true ) : boolean Returns a value indicating whether a property can be read.
canSetProperty ( string $name, boolean $checkVars = true ) : boolean Returns a value indicating whether a property can be set.
className ( ) : string Returns the fully qualified name of this class.
hasMethod ( string $name ) : boolean Returns a value indicating whether a method is defined.
hasProperty ( string $name, boolean $checkVars = true ) : boolean Returns a value indicating whether a property is defined.
init ( ) Initializes the object.

Описание методов

__call() публичный Метод

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.
public __call ( string $name, array $params ) : mixed
$name string the method name
$params array method parameters
Результат mixed the method return value

__construct() публичный Метод

The default implementation does two things: - Initializes the object with the given configuration $config. - Call Object::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.
public __construct ( array $config = [] )
$config array name-value pairs that will be used to initialize the object properties

__get() публичный Метод

Do not call this method directly as it is a PHP magic method that will be implicitly called when executing $value = $object->property;.
См. также: __set()
public __get ( string $name ) : mixed
$name string the property name
Результат mixed the property value

__isset() публичный Метод

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.
См. также: http://php.net/manual/en/function.isset.php
public __isset ( string $name ) : boolean
$name string the property name or the event name
Результат boolean whether the named property is set (not null).

__set() публичный Метод

Do not call this method directly as it is a PHP magic method that will be implicitly called when executing $object->property = $value;.
См. также: __get()
public __set ( string $name, mixed $value )
$name string the property name or the event name
$value mixed the property value

__unset() публичный Метод

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.
См. также: http://php.net/manual/en/function.unset.php
public __unset ( string $name )
$name string the property name

canGetProperty() публичный Метод

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);
См. также: canSetProperty()
public canGetProperty ( string $name, boolean $checkVars = true ) : boolean
$name string the property name
$checkVars boolean whether to treat member variables as properties
Результат boolean whether the property can be read

canSetProperty() публичный Метод

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);
См. также: canGetProperty()
public canSetProperty ( string $name, boolean $checkVars = true ) : boolean
$name string the property name
$checkVars boolean whether to treat member variables as properties
Результат boolean whether the property can be written

className() публичный статический Метод

Returns the fully qualified name of this class.
public static className ( ) : string
Результат string the fully qualified name of this class.

hasMethod() публичный Метод

The default implementation is a call to php function method_exists(). You may override this method when you implemented the php magic method __call().
public hasMethod ( string $name ) : boolean
$name string the method name
Результат boolean whether the method is defined

hasProperty() публичный Метод

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);
См. также: canGetProperty()
См. также: canSetProperty()
public hasProperty ( string $name, boolean $checkVars = true ) : boolean
$name string the property name
$checkVars boolean whether to treat member variables as properties
Результат boolean whether the property is defined

init() публичный Метод

This method is invoked at the end of the constructor after the object is initialized with the given configuration.
public init ( )