41 return get_called_class();
54 return get_parent_class( $this );
78 return ( $class == get_class( $this ) );
101 return is_subclass_of( $this, $class );
118 public static function __delta( $last_version, $old_version )
120 $last_version_stack = array();
121 $old_version_stack = array();
126 foreach ( $old_version as $key => $value ) {
127 $old_version_stack[$key] = $value;
131 foreach ( $last_version as $key => $value ) {
133 if ( !isset( $old_version_stack[$key] ) ) {
134 $old_version->$key = $value;
137 elseif ( empty( $old_version_stack[$key] ) || is_null( $old_version_stack[$key] ) ) {
138 $old_version->$key = $value;
146 if ( is_object( $value ) ) {
147 self::__delta( $value, $old_version->$key );
156 foreach ( $last_version as $key => $value ) {
157 $last_version_stack[$key] = $value;
161 foreach ( $old_version as $key => $value ) {
163 if ( !isset( $last_version_stack[$key] ) ) {
165 unset( $old_version->$key );
172 public static function delta( $last_version, $old_version )
174 _deprecated_function( __CLASS__ .
'::' . __FUNCTION__,
'1.4.8',
'__delta()' );
175 return self::__delta( $last_version, $old_version );
187 public static function __dump( $var, $monitor =
false )
190 <pre <?php if( $monitor ) : ?> style=
"height:100px;overflow-y:scroll;background-color:#222;color:#ffa841" <?php endif; ?>><?php var_dump( $var ) ?></pre><?php
191 $content = ob_get_contents();
200 $content = strtr( $content, $replaces );