PHP 클래스 yii\base\Object

상속: implements Configurable
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 메소드들

메소드 설명
__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 ( )