PHP 클래스 WPDKObject

This abstract class - when inerith - add a more efficent management of properties. WPDKObject is the root class of most WPDK class hierarchies. Through WPDKObject, objects inherit a basic interface to the runtime system and the ability to behave as WPDK objects.
저자: =undo= ([email protected])
파일 보기 프로젝트 열기: wpxtreme/wpdk 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$__version string If no version has been set, the default is '1.0.0'. Version numbers are needed for decoding or unarchiving, so older versions of an object can be detected and decoded correctly.

공개 메소드들

메소드 설명
__className ( ) : string Returns the class name. Returns FALSE if called from outside a class.
__delta ( mixed $last_version, mixed $old_version ) : Object Do a merge/combine between two object tree.
__dump ( mixed $var, boolean $monitor = false ) Useful static method to dump any variable with a
 HTML tag wrap    
__isClass ( string $class ) : boolean Return TRUE if the instance is an instance of $class.
__isSubclassOfClass ( object $class ) : boolean Returns a Boolean value that indicates whether the receiving class is a subclass of, or identical to, a given class.
__parentClass ( ) : string Returns the name of the parent class of the class of which object is an instance or the name.
delta ( $last_version, $old_version )

메소드 상세

__className() 공개 메소드

Returns the class name. Returns FALSE if called from outside a class.
부터: 1.2.0
public __className ( ) : string
리턴 string

__delta() 공개 정적인 메소드

If the old version not contains an object or property, that is added. If the old version contains an object or property less in last version, that is deleted.
부터: 1.2.0
public static __delta ( mixed $last_version, mixed $old_version ) : Object
$last_version mixed Object tree with new or delete object/value
$old_version mixed Current Object tree, loaded from serialize or database for example
리턴 Object the delta Object tree

__dump() 공개 정적인 메소드

Useful static method to dump any variable with a
 HTML tag wrap        
부터: 1.3.0
public static __dump ( mixed $var, boolean $monitor = false )
$var mixed Some variable
$monitor boolean Optional. If true a old style monitor layout is displayed

__isClass() 공개 메소드

This method is different from is_a(): class a extends WPDKObject } class b extends a } $b = new b(); echo is_a( $b, 'a' ); // TRUE echo $b->__isClass( 'a' ); // FALSE
부터: 1.2.0
public __isClass ( string $class ) : boolean
$class string Class name
리턴 boolean

__isSubclassOfClass() 공개 메소드

class a extends WPDKObject } class b extends a } $b = new b(); echo $b->__isSubclassOfClass( 'a' ); // TRUE echo $b->__isSubclassOfClass( 'WPDKObject' ); // TRUE
부터: 1.2.0
public __isSubclassOfClass ( object $class ) : boolean
$class object A class object
리턴 boolean

__parentClass() 공개 메소드

Returns the name of the parent class of the class of which object is an instance or the name.
부터: 1.2.0
public __parentClass ( ) : string
리턴 string

delta() 공개 정적인 메소드

사용 중단: since 1.4.8 - use __delta() instead
public static delta ( $last_version, $old_version )

프로퍼티 상세

$__version 공개적으로 프로퍼티

If no version has been set, the default is '1.0.0'. Version numbers are needed for decoding or unarchiving, so older versions of an object can be detected and decoded correctly.
부터: 1.2.0
public string $__version
리턴 string