public function initalPropertySet( $key, $value)
    {

        // Is this one of our initialProperties
        // Is it different. Should we store it?
        if( is_array( $this->dataInitial ) and $repository = $this->r() and in_array( $key, $repository->initialProperties ) ) {

            $initialValue = $this->get( $key, self::READONLY_EXCEPTION, $source = self::DATA );

            // only bother setting if the new value differs from the old and we don't have a dataInitial yet
            if( $initialValue !== $value and !array_key_exists( $key, $this->dataInitial ) ) {
                $this->dataInitial[$key] = $initialValue;
                return true;
            }

        }

        return false;

    }
public function initalPropertySet( $key, $value)
    {

        // Is this one of our initialProperties
        // Is it different. Should we store it?
        if( is_array( $this->dataInitial ) and $repository = $this->r() and in_array( $key, $repository->initialProperties ) ) {

            $initialValue = $this->get( $key, self::READONLY_EXCEPTION, $source = self::DATA );

            // only bother setting if the new value differs from the old and we don't have a dataInitial yet
            if( $initialValue !== $value and !array_key_exists( $key, $this->dataInitial ) ) {
                $this->dataInitial[$key] = $initialValue;
                return true;
            }

        }

        return false;

    }
public function initalPropertySet ( $ key , $ value ) { // Is this one of our initialProperties // Is it different. Should we store it? if ( is_array ( $ this -> dataInitial ) and $ repository = $ this -> r ( ) and in_array ( $ key , $ repository -> initialProperties ) ) { $ initialValue = $ this -> get ( $ key , self :: READONLY_EXCEPTION , $ source = self :: DATA ) ; // only bother setting if the new value differs from the old and we don't have a dataInitial yet if ( $ initialValue !== $ value and ! array_key_exists ( $ key , $ this -> dataInitial ) ) { $ this -> dataInitial [ $ key ] = $ initialValue ; return true ; } } return false ; }
InitialPropertiesSet helper method
InitialPropertiesSet helper method