src/Service/Reflection/ReflectionClass.php
public function retrieveValue(\ReflectionProperty $refProperty)
    {
        $propName = $refProperty->getName();

        if (array_key_exists("\0*\0" . $propName, $this->objectArray)) {
            // Protected or a private
            return $this->objectArray["\0*\0" . $propName];
        }

        if (array_key_exists($propName, $this->objectArray)) {
            // Must be a public. Those are rare.
            return $this->objectArray[$propName];
        }

        if ($refProperty->isStatic() === true) {
            // Static values are not inside the value array.
            $refProperty->setAccessible(true);
            return $refProperty->getValue($this->data);
        }

        // If we are facing multiple declarations, the declaring class name
        // is set in front of the key.
        $propName = "\0" . $refProperty->getDeclaringClass()->getName() . "\0" . $propName;
        if (array_key_exists($propName, $this->objectArray)) {
            // Found it!
            return $this->objectArray[$propName];
        }

        // We are still here, which means that we are not able to get the value
        // out of it. The only remaining possibility is, that this value was
        // unset during runtime.
        $refProperty->isUnset = true;
        return null;
    }
public function retrieveValue(\ReflectionProperty $refProperty)
    {
        $propName = $refProperty->getName();

        if (array_key_exists("\0*\0" . $propName, $this->objectArray)) {
            // Protected or a private
            return $this->objectArray["\0*\0" . $propName];
        }

        if (array_key_exists($propName, $this->objectArray)) {
            // Must be a public. Those are rare.
            return $this->objectArray[$propName];
        }

        if ($refProperty->isStatic() === true) {
            // Static values are not inside the value array.
            $refProperty->setAccessible(true);
            return $refProperty->getValue($this->data);
        }

        // If we are facing multiple declarations, the declaring class name
        // is set in front of the key.
        $propName = "\0" . $refProperty->getDeclaringClass()->getName() . "\0" . $propName;
        if (array_key_exists($propName, $this->objectArray)) {
            // Found it!
            return $this->objectArray[$propName];
        }

        // We are still here, which means that we are not able to get the value
        // out of it. The only remaining possibility is, that this value was
        // unset during runtime.
        $refProperty->isUnset = true;
        return null;
    }
public function retrieveValue ( \ ReflectionProperty $ refProperty ) { $ propName = $ refProperty -> getName ( ) ; if ( array_key_exists ( "\0*\0" . $ propName , $ this -> objectArray ) ) { // Protected or a private return $ this -> objectArray [ "\0*\0" . $ propName ] ; } if ( array_key_exists ( $ propName , $ this -> objectArray ) ) { // Must be a public. Those are rare. return $ this -> objectArray [ $ propName ] ; } if ( $ refProperty -> isStatic ( ) === true ) { // Static values are not inside the value array. $ refProperty -> setAccessible ( true ) ; return $ refProperty -> getValue ( $ this -> data ) ; } // If we are facing multiple declarations, the declaring class name // is set in front of the key. $ propName = "\0" . $ refProperty -> getDeclaringClass ( ) -> getName ( ) . "\0" . $ propName ; if ( array_key_exists ( $ propName , $ this -> objectArray ) ) { // Found it! return $ this -> objectArray [ $ propName ] ; } // We are still here, which means that we are not able to get the value // out of it. The only remaining possibility is, that this value was // unset during runtime. $ refProperty -> isUnset = true ; return null ; }
Retrieve the value from the object, if possible.

@param \ReflectionProperty $refProperty
The reflection of the property we are analysing.

@return mixed;
The retrieved value.
Retrieve the value from the object if possible .