private function createReadingDelegate()
    {
        return $this->readDelegate ?: $this->readDelegate = function ($property, PropertyAccessor $propertyAccessor) {
            switch (true) {

                // Public property / accessor case
                case $propertyAccessor->isReadable($this, $property) :
                    return $propertyAccessor->getValue($this, $property);

                // Private property / StdClass
                case property_exists($this, $property) || $this instanceof \StdClass:
                    return $this->$property;
            }

            throw new InvalidScopeException(sprintf(
                'Unable to read "%s" property from a "%s" object, any existing property path to read it in.',
                $property,
                get_class($this)
            ));
        };
    }
private function createReadingDelegate()
    {
        return $this->readDelegate ?: $this->readDelegate = function ($property, PropertyAccessor $propertyAccessor) {
            switch (true) {

                // Public property / accessor case
                case $propertyAccessor->isReadable($this, $property) :
                    return $propertyAccessor->getValue($this, $property);

                // Private property / StdClass
                case property_exists($this, $property) || $this instanceof \StdClass:
                    return $this->$property;
            }

            throw new InvalidScopeException(sprintf(
                'Unable to read "%s" property from a "%s" object, any existing property path to read it in.',
                $property,
                get_class($this)
            ));
        };
    }
private function createReadingDelegate ( ) { return $ this -> readDelegate ? : $ this -> readDelegate = function ( $ property , PropertyAccessor $ propertyAccessor ) { switch ( true ) { // Public property / accessor case case $ propertyAccessor -> isReadable ( $ this , $ property ) : return $ propertyAccessor -> getValue ( $ this , $ property ) ; // Private property / StdClass case property_exists ( $ this , $ property ) || $ this instanceof \ StdClass : return $ this -> $ property ; } throw new InvalidScopeException ( sprintf ( 'Unable to read "%s" property from a "%s" object, any existing property path to read it in.' , $ property , get_class ( $ this ) ) ) ; } ; }
Create and return a Closure available to read an object property through a property path or a private property.

@return \Closure
Create and return a Closure available to read an object property through a property path or a private property .