{@inheritDoc}

Checks is the value actually exist before fetching it.
This is to avoid calling `__get` on the provided $object if it
is a {@see \Doctrine\Common\Proxy\Proxy}.
322547
public function getValue($object = null)
    {
        $name = $this->getName();

        if ($object instanceof Proxy && ! $object->__isInitialized()) {
            $originalInitializer = $object->__getInitializer();
            $object->__setInitializer(null);
            $val = $object->$name ?? null;
            $object->__setInitializer($originalInitializer);

            return $val;
        }

        return isset($object->$name) ? parent::getValue($object) : null;
    }
534337
protected function checkValue($value, $key = null)
    {
        if ($value != null) {
            if ($key !== null) {
                return isset($value[$key]) ? $value[$key] : null;
            }

            return $value;
        }
    }
20268
public static function getValue($object, $propertyName)
    {
        $possibleGetter = array('get' . ucfirst($propertyName), 'is' . ucfirst($propertyName));

        /*
         * This case handle both $URL, and $xPosition case.
         * The getter for $xPosition is getxPosition because of the implementation of
         * "java.beans.Introspector.decapitalize".
         * {@see http://stackoverflow.com/a/16146215}
         * {@see http://dertompson.com/2013/04/29/java-bean-getterssetters/}
         */
        if (substr($propertyName, 1, 1) !== strtolower(substr($propertyName, 1, 1))) {
            $possibleGetter[] = 'get' . $propertyName;
            $possibleGetter[] = 'is' . $propertyName;
        }

        foreach ($possibleGetter as $getter) {
            if (method_exists($object, $getter) || is_callable(array($object, $getter), false)) {
                try {
                    return call_user_func(array($object, $getter));
                    // @codingStandardsIgnoreLine
                } catch (\BadFunctionCallException $e) {
                    //Do nothing and continue
                    // @codingStandardsIgnoreLine
                } catch (\InvalidArgumentException $e) {
                    //Do nothing and continue
                }
            }
        }

        throw new \InvalidArgumentException(
            vsprintf(
                'The class "%s" does not have any getter for the property "%s" (tried getters: "%s")',
                array(get_class($object), $propertyName, implode('", "', $possibleGetter))
            )
        );
    }
661017
public function contains($object)
    {
        if ($object instanceof LatLng) {
            $lat = $object->getLatitude();
            $lng = $object->getLongitude();

            if ($this->getWest() > $lng || $this->getEast() < $lng) {
                return false;
            }

            return ($this->getSouth() <= $lat && $this->getNorth() >= $lat);
        } elseif ($object instanceof LatLngBounds) {
            throw new \RuntimeException('LatLngBounds checking not implemented so far');
        }

        return false;
    }
441715
public function getValue($object) {
		if(null === $this->reflectionClass) {
			$this->reflectionClass = new \ReflectionClass($this->class);
		}
		$method = $this->reflectionClass->getMethod($this->getter);
		return $method->invoke($object);
	}
377616
public function hasRequirements($object = null)
    {
        if ($object === null) {
            return count($this->requirements) > 0;
        }

        $requirements = $this->getRequirementsObject($object);

        return !empty($requirements);
    }
1166379
public function objectExists() {
		if ($this->data()->useObjectExistsHandling()) {
			return singleton($this->CreateType)->objectExists($this->request->postVars(), $this->pid);
		}
	}
1362144
public function valueExists($field, $value = null)
    {
        $record = new static($this->table, $this->keys, $this->mapper);

        if ($value === null) {
            $value = $this->$field;
        }

        try {
            $record->load([$field => $value]);
        } catch (NoResultException $e) {
            return false;
        }

        if ($record->$field != $value) {
            return false;
        }

        // check record keys same as self
        $same = [];

        foreach ($this->keys as $key) {
            $same[] = ($record->$key == $this->$key);
        }

        // Key not same, means same value exists in other record.
        if (in_array(false, $same, true)) {
            return true;
        }

        return false;
    }
611186
public function isRegisteredValueObject($object)
    {
        if (!is_string($object)) {
            $object = get_class($object);
        }

        return array_key_exists($object, $this->valueClasses);
    }
959377
private Object checkAndProxyReturnValue(Object retValue) {
        if (retValue != null && retValue instanceof RESTBaseEntityCollectionV1) {
            // The parent will either be a user defined parent, or the entity itself.
            final RESTBaseEntityV1<?> parent = this.parent == null ? getProxyEntity() : this.parent;
            return RESTCollectionProxyFactory.create(getProviderFactory(), (RESTBaseEntityCollectionV1) retValue, isRevision, parent);
        } else {
            return retValue;
        }
    }
1086030
function exists($key,&$val=NULL) {
		$val=$this->ref($key,FALSE);
		return isset($val)?
			TRUE:
			(Cache::instance()->exists($this->hash($key).'.var',$val)?:FALSE);
	}
116827
public function is_object_exist($bucket, $object, $opt = array()) {
		$this->assertParameterArray ( $opt );
		$opt [self::BUCKET] = $bucket;
		$opt [self::METHOD] = 'HEAD';
		$opt [self::OBJECT] = $object;
		$response = $this->get_object_info ( $bucket, $object, $opt );
		if ($response->isOK ()) {
			return true;
		} elseif ($response->status === 404) {
			return false;
		}
		return $response;
	}
160908
public function isReadOnly($object)
    {
        if ( ! is_object($object)) {
            throw ORMInvalidArgumentException::readOnlyRequiresManagedEntity($object);
        }

        return isset($this->readOnlyObjects[spl_object_hash($object)]);
    }
913405
private static function canBeSerializedAsValue($object)
    {
        $result = true;
        self::traverse(false, $object, function ($obj) use (&$result)
        {
            // short circuit as soon as possible.
            if ($result === false)
            {
                return;
            }
            // cannot make a pointer to an unsaved object.
            if ($obj instanceof AVObject)
            {
                if (!$obj->getObjectId())
                {
                    $result = false;

                    return;
                }
            }
        });

        return $result;
    }
614914
private function supports($object)
    {
        if ($object instanceof ObjectCollection) {
            return $object->isInstanceOf($this->getClass());
        } else {
            //doctrine sends proxy so we have to do the check with the instanceof operator
            $rc = new \ReflectionClass($this->getClass());
            $toCheck = $rc->newInstanceWithoutConstructor();

            return $object instanceof $toCheck;
        }
    }
671385
protected function fetch($value)
    {
        if (empty($value)) {
            if (true === $this->null) {
                return;
            }
            throw new Exception('Value in fetch method of PrimaryKeyField cannot be empty');
        }

        return $this->fetchModel($value);
    }
1272101
public function exists( $key ) {
		return ( is_array( $this->data ) && array_key_exists( $key, $this->data ) ) ||
			( is_object( $this->data ) && property_exists( $this->data, $key ) );
	}