Get the value of private property.

@param object $object   The object
@param string $property The property name

@return mixed
164519
public static function getPropertyValue($object, $property)
    {
        $ref = new \ReflectionClass($object);
        $prop = static::getPrivateProperty($ref, $property);
        $prop->setAccessible(true);
        $value = $prop->getValue($object);
        $prop->setAccessible(false);

        return $value;
    }
1033737
public function &get($property)
    {
        if (!strlen((string)$property)) {
            throw new InvalidArgumentException('Cannot get an empty property');
        }

        $value = null;
        $method = static::_accessor($property, 'get');

        if (isset($this->_properties[$property])) {
            $value =& $this->_properties[$property];
        }

        if ($method) {
            $result = $this->{$method}($value);

            return $result;
        }

        return $value;
    }
980942
public Object getProperty(Object object, String property) {
        return delegate.getProperty(object, property);
    }
588959
public static function fetchProperty($object, $property)
    {
        $refl = new \ReflectionObject($object);
        $prop = $refl->getProperty($property);
        $prop->setAccessible(true);

        return $prop->getValue($object);
    }
1049432
public function get($property)
    {
        if (!$this->exists($property)) {
            throw new UndefinedPropertyException($property);
        }

        return $this->data()->$property;
    }
889838
public function &__get($property)
    {
        $return = null;

        // check if the property is present in the content object
        if (isset($this->object->{ $property })) {
            $return = $this->object->{ $property };
        }

        return $return;
    }
1340291
public static function getValue($object, $propertyName)
    {
        $classReflection = new \ReflectionClass(get_class($object));
        if (!$classReflection->hasProperty($propertyName)) {
            throw new \InvalidArgumentException(
                'The class "' . get_class($object) . '" does not have the property "' . $propertyName . '"'
            );
        }
        $propertyReflection = $classReflection->getProperty($propertyName);
        if ($propertyReflection->isPublic()) {
            return $propertyReflection->getValue($object);
        }

        if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
            $propertyReflection->setAccessible(true);
            $value = $propertyReflection->getValue($object);
            $propertyReflection->setAccessible(false);
            return $value;
        }

        throw new \InvalidArgumentException(
            'The property "' . $propertyName . '" of the class "' . get_class($object) . '" is not readable'
        );
    }
207394
public function getValue($object) {
		ArgUtils::assertTrue($object instanceof DynamicDispatchable);
		$value = $object->getPropertyValue($this->propertyName);
		if ($this->nullReturnAllowed && $value === null) return $value;
		
		try {
			$value = $this->constraint->validate($value);
		} catch (ValueIncompatibleWithConstraintsException $e) {
			throw new PropertyValueTypeMissmatchException(
					TypeUtils::prettyMethName(get_class($object), 'getPropertyValue') 
							. ' returns invalid value for property \'' . $this->propertyName . '\'', 0, $e);
		}
		return $value;
	}
703584
public static function setProtectedProperty($object, $property, $value)
    {
        $refObject = new \ReflectionObject($object);
        $refProp   = $refObject->getProperty($property);
        $refProp->setAccessible(true);
        $refProp->setValue($object, $value);

        return $object;
    }
1273060
public static function getProperty(
        string $property,
        ?object $object,
        $defaultValue = null,
        ?string $classOverride = null
    ) {
        $reflectionClass = self::getReflectionClass($object, $classOverride);
        try {
            $property = $reflectionClass->getProperty($property);
            if ($object === null && !$property->isStatic()) {
                return $defaultValue;
            }
            $property->setAccessible(true);
            return $property->getValue($object);
        } catch (Exception $e) {
            return $defaultValue;
        }
    }
497554
public function getGettablePropertiesOfObject($object)
    {
        $className = get_class($object);

        if (false === isset($this->gettablePropertiesOfObjects[$className])) {
            $this->gettablePropertiesOfObjects[$className] = [];
            $properties = $this->getReflectionService()->getClassPropertyNames($className);

            foreach ($properties as $propertyName) {
                if (true === $this->isPropertyGettable($object, $propertyName)) {
                    $this->gettablePropertiesOfObjects[$className][] = $propertyName;
                }
            }
        }

        return $this->gettablePropertiesOfObjects[$className];
    }
1212310
public function getPropertyValue($property) {

        if (FALSE !== strstr($property, '.')) {
            $property = explode('.', $property);
        } else {
            $property = [$property];
        }

        if (count($property) == 1) {
            return $this
                ->getProperty($property[0])
                ->getValue($this->instance);
        }

        $classMapper = $this;
        foreach ($property as $item) {
            $value = $classMapper
                ->getProperty($item)
                ->getValue($classMapper->instance);

            if (is_object($value)) {
                $classMapper = $classMapper::createFromInstance($value);
            }
        }

        return $value;
    }
480445
protected function getPropertyValue($property)
    {
        $getter = sprintf('get%s', $property);
        if (!method_exists($this->object, $getter)) {
            throw new NostoException(
                sprintf(
                    'Class %s does not have getter for property %s',
                    get_class($this->object),
                    $property
                )
            );
        }

        return $this->object->$getter();
    }
1027531
public function get($property, $default = null)
	{
		if ($property == 'password')
		{
			return $this->_password;
		}

		if ('_' == substr($property, 0, 1))
		{
			$this->setError("Can't access private properties");
			return false;
		}

		if (!property_exists(__CLASS__, $property))
		{
			if (property_exists(__CLASS__, '_auxs_' . $property))
			{
				$property = '_auxs_' . $property;
			}
			else if (property_exists(__CLASS__, '_auxv_' . $property))
			{
				$property = '_auxv_' . $property;
			}
			else
			{
				$this->setError("Unknown property: $property");
				return false;
			}
		}

		if ($this->$property === false)
		{
			$db = \App::get('db');

			$property_name = substr($property, 6);

			$query = "SELECT $property_name FROM `#__xprofiles` AS x, `#__xprofiles_$property_name` AS xp WHERE x.uidNumber=xp.uidNumber AND xp.uidNumber=" . $db->quote($this->get('uidNumber')) . " ORDER BY $property_name ASC;";

			$db->setQuery($query);

			$result = $db->loadColumn();

			if ($result === false)
			{
				$this->setError("Error retrieving data from xprofiles $property table: " . $db->getErrorMsg());
			}
			else if ('_auxs_' == substr($property, 0, 6))
			{
				if (isset($result[0]))
				{
					$this->set($property_name, $result[0]);
				}
				else
				{
					$this->set($property_name, '');
				}
			}
			else
			{
				if (is_array($result) && count($result) <= 1 && empty($result[0]))
				{
					$this->set($property_name, array());
				}
				else
				{
					$this->set($property_name, $result);
				}
			}
		}

		return $this->$property;
	}
1195855
public function remove($property, $value)
	{
		if ('_' == substr($property, 0, 1))
		{
			$this->setError("Can't access private properties");
			return false;
		}

		if (property_exists(__CLASS__, $property) || property_exists(__CLASS__, '_auxs_' . $property))
		{
			$this->setError("Can't remove value(s) from non-array property.");
			return false;
		}

		if (!property_exists(__CLASS__, '_auxv_' . $property))
		{
			$this->setError("Unknown property: $property");
			return false;
		}

		if (!isset($value))
		{
			return true;
		}

		if (!is_array($value))
		{
			$value = array($value);
		}

		$property = '_auxv_' . $property;

		foreach ($value as $v)
		{
			$v = strval($v);

			if (in_array($v, $this->$property))
			{
				$this->$property = array_diff($this->$property, array($v));
			}
		}

		return true;
	}
1205204
public static function getValue($objectOrArray, $property)
    {
        $propertyValue = null;

        if (is_object($objectOrArray)) {

            $camelProp = str_replace(' ', '', ucwords(str_replace('_', ' ', $property)));
            $methods = array('get'.$camelProp, lcfirst($camelProp), 'is'.$camelProp, 'has'.$camelProp);

            foreach ($methods as $method) {
                if (method_exists($objectOrArray, $method)) {
                    $propertyValue = $objectOrArray->$method();
                    break;
                }
            }

            if (null === $propertyValue && property_exists($objectOrArray, $property)) {
                $propertyValue = $objectOrArray->$property;
            }
        } elseif (is_array($objectOrArray)) {
            if (isset($objectOrArray[$property])) {
                $propertyValue = $objectOrArray[$property];
            }
        }

        return $propertyValue;
    }
348602
public static function result($object, $property)
    {
        $value = static::get($object, $property);

        if (static::isFunction($value)) {
            static::associate($value, $object);
            return $value();
        }

        return $value;
    }