WPDK
1.5.0
WordPress Development Kit
|
Public Member Functions | |
__className () | |
Returns the class object. More... | |
__parentClass () | |
Returns the class object for the receiver’s superclass. More... | |
__isClass ($class) | |
Brief. More... | |
__isSubclassOfClass ($class) | |
Return TRUE if the receiving class is a subclass of —or identical to— $class, otherwise FALSE. More... | |
Static Public Member Functions | |
static | __delta ($last_version, $old_version) |
Object delta compare for combine. More... | |
static | delta ($last_version, $old_version) |
static | __dump ($var, $monitor=false) |
Dump a variable. More... | |
Data Fields | |
$__version = '1.0.0' | |
The version number assigned to the class. More... | |
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.
Definition at line 16 of file wpdk-object.php.
__className | ( | ) |
Returns the class object.
Returns the class name. Returns FALSE if called from outside a class.
Definition at line 39 of file wpdk-object.php.
|
static |
Object delta compare for combine.
Do a merge/combine between two object tree. 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.
mixed | $last_version | Object tree with new or delete object/value |
mixed | $old_version | Current Object tree, loaded from serialize or database for example |
Definition at line 118 of file wpdk-object.php.
|
static |
Dump a variable.
Useful static method to dump any variable with a <pre>
HTML tag wrap
mixed | $var | Some variable |
bool | $monitor | Optional. If true a old style monitor layout is displayed |
Definition at line 187 of file wpdk-object.php.
__isClass | ( | $class | ) |
Brief.
Return TRUE if the instance is an instance of $class. 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
string | $class | Class name |
Definition at line 76 of file wpdk-object.php.
__isSubclassOfClass | ( | $class | ) |
Return TRUE if the receiving class is a subclass of —or identical to— $class, otherwise FALSE.
Returns a Boolean value that indicates whether the receiving class is a subclass of, or identical to, a given class.
class a extends WPDKObject {} class b extends a {} $b = new b(); echo $b->__isSubclassOfClass( 'a' ); // TRUE echo $b->__isSubclassOfClass( 'WPDKObject' ); // TRUE
object | $class | A class object |
Definition at line 99 of file wpdk-object.php.
__parentClass | ( | ) |
Returns the class object for the receiver’s superclass.
Returns the name of the parent class of the class of which object is an instance or the name.
Definition at line 52 of file wpdk-object.php.
|
static |
Definition at line 172 of file wpdk-object.php.
string $__version = '1.0.0' |
The version number assigned to the class.
Returns the version number assigned to the class. 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.
Definition at line 29 of file wpdk-object.php.