WPDK  1.5.0
WordPress Development Kit
 All Data Structures Files Functions Variables Pages
WPDKObject Class Reference
Inheritance diagram for WPDKObject:
WPDKArray WPDKColors WPDKCrypt WPDKDateTime WPDKFilesystem WPDKGlyphIcons WPDKHTML WPDKHTMLTag WPDKMath WPDKPost WPDKView WPDKViewController WPDKWordPressAdmin WPDKWordPressTheme

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...
 

Detailed Description

Overview

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.

Author
=undo= info@.nosp@m.wpxt.nosp@m.re.me
Date
2014-01.08
Version
0.5.0

Definition at line 16 of file wpdk-object.php.

Member Function Documentation

__className ( )

Returns the class object.

Returns the class name. Returns FALSE if called from outside a class.

Since
1.2.0
Returns
string

Definition at line 39 of file wpdk-object.php.

static __delta (   $last_version,
  $old_version 
)
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.

Since
1.2.0
Parameters
mixed$last_versionObject tree with new or delete object/value
mixed$old_versionCurrent Object tree, loaded from serialize or database for example
Returns
Object the delta Object tree

Definition at line 118 of file wpdk-object.php.

static __dump (   $var,
  $monitor = false 
)
static

Dump a variable.

Useful static method to dump any variable with a <pre> HTML tag wrap

Since
1.3.0
Parameters
mixed$varSome variable
bool$monitorOptional. 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
Since
1.2.0
Parameters
string$classClass name
Returns
bool

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
Since
1.2.0
Parameters
object$classA class object
Returns
bool

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.

Since
1.2.0
Returns
string

Definition at line 52 of file wpdk-object.php.

static delta (   $last_version,
  $old_version 
)
static

Definition at line 172 of file wpdk-object.php.

Field Documentation

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.

Since
1.2.0

Definition at line 29 of file wpdk-object.php.


The documentation for this class was generated from the following file: