@param object $object
@param string $getter

@return mixed

@throws SolrMappingException if given getter does not exists
341983
private function callGetterMethod($object, $getter)
    {
        $methodName = $getter;
        if (strpos($getter, '(') !== false) {
            $methodName = substr($getter, 0, strpos($getter, '('));
        }

        if (!method_exists($object, $methodName)) {
            throw new SolrMappingException(sprintf('No method "%s()" found in class "%s"', $methodName, get_class($object)));
        }

        $method = new \ReflectionMethod($object, $methodName);
        // getter with arguments
        if (strpos($getter, ')') !== false) {
            $getterArguments = explode(',', substr($getter, strpos($getter, '(') + 1, -1));
            $getterArguments = array_map(function ($parameter) {
                return trim(preg_replace('#[\'"]#', '', $parameter));
            }, $getterArguments);

            return $method->invokeArgs($object, $getterArguments);
        }

        return $method->invoke($object);
    }
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;
    }
274252
public static function getFromObject($object, string $key)
    {
        if ($object == null) {
            return null;
        }
        if (!isset ($object->{$key})) {
            return null;
        }
        return $object->{$key};
    }
588959
public static function fetchProperty($object, $property)
    {
        $refl = new \ReflectionObject($object);
        $prop = $refl->getProperty($property);
        $prop->setAccessible(true);

        return $prop->getValue($object);
    }
321929
public function getPropForkObject(object $object): object {
		return $this->getObjectPropertyAccessProxy()->getValue($object) 
				?? ReflectionUtils::createObject($this->getEntityProperty(true)
						->getEmbeddedEntityPropertyCollection()->getClass());
	}
177708
public function refresh(&$object)
    {
        if (!isset($this->objectsRepository[spl_object_hash($object)])) {
            return;
        }
        $repository = $this->objectsRepository[spl_object_hash($object)];
        $id = $repository->getHydrator()->unhydrate($object)["_id"];
        $projection = $repository->getLastProjection($object);
        $collection = $repository->getCollection();
        $hydrator = $repository->getHydrator();

        if (null !== ($data = $collection->findOne(['_id' => $id], ['projection' => $projection]))) {
            $hydrator->hydrate($object, $data);
            $repository->cacheObject($object);
        } else {
            $object = null;
        }
        return $object;
    }
242552
public function extract($object)
    {
        if (!$object instanceof SecretQuestion) {
            throw new \Exception('$object must be an instance of SecretQuestion');
        }
        /* @var $object SecretQuestion */
        $data = parent::extract($object);

        return $data;
    }
1110283
public function extract($object)
    {
        $data = parent::extract($object);

        foreach ($this->getFreeValuesKeys() as $key) {
            $data[$key] = $object->get($key);
        }

        return $data;
    }
581303
public static function get($object) {
        /** @var \Gcs\Framework\Core\Http\Request\Form $class */
        $class = $object->name;
        $class = new $class();
        $class->init();

        $request = Request::instance();

        if (($class->getForm() == '' && $request->data->form == true) || isset($request->data->post[$class->getForm()])) {
            switch ($request->data->method) {
                case 'get' :
                    $class->get();
                    break;

                case 'post' :
                    $class->post();
                    break;

                case 'put' :
                    $class->put();
                    break;

                case 'patch' :
                    $class->patch();
                    break;

                case 'delete' :
                    $class->delete();
                    break;
            }

            $class->check();
        }

        return $class;
    }
1354769
public function getter($id, Closure $getter) {
		// Format id
		$id = $this->_format($id);
		// Verify existence
		if(!$this->has($id)) {
			throw new NotFoundException("'$id' value does not exist");
		}
		// Add inflector
		$this->values[$id]->addOutputInflector($getter);
	}
535942
public function offsetGet($object)
    {
        if (!$object instanceof AnObjectHandlable) {
            throw new InvalidArgumentException('Object needs to implement AnObjectHandlable');
        }

        return $this->_object_set->offsetGet($object->getHandle());
    }
328599
public static function getProperty($object, string $property)
    {
        $getter = \Closure::bind(
            function ($object) use ($property) {
                return $object->{$property};
            },
            null,
            get_class($object)
        );

        return $getter($object);
    }
547091
public function extract($object)
    {
        $this->prepare($object);

        if ($this->byValue) {
            return $this->extractByValue($object);
        }

        return $this->extractByReference($object);
    }
1342074
public function extract($object)
    {
        if (!$object instanceof ServerInfo) {
            throw new \Exception('$object must be an instance of ServerInfo');
        }
        /* @var $object ServerInfo */
        $data = parent::extract($object);

        return $data;
    }
532244
public function unhydrate($object)
    {
        $properties = $this->classMetadata->getPropertiesInfos();
        $datas = [];

        if (!is_object($object)) {
            return $object;
        }

        foreach ($properties as $name => $infos) {
            $prop = new \ReflectionProperty($this->classMetadata->getName(), $name);
            $prop->setAccessible(true);

            $value = $prop->getValue($object);
            if (null === $value) {
                continue;
            }

            if (($value instanceof \MongoDB\Model\BSONDocument) || ($value instanceof \MongoDB\Model\BSONArray)) {
                $value = $this->recursiveConvertInArray((array) $value);
            }

            if (is_object($value) && $infos->getEmbedded()) {
                $class = get_class($value);
                if (!class_exists($class)) {
                    $class = $this->classMetadata->getNamespace() . "\\" . $class;
                }
                $value = $this->getHydrator($class)->unhydrate($value);
            }

            if (is_array($value) && $infos->getMultiEmbedded()) {
                $array = [];
                foreach ($value as $key => $embeddedValue) {
                    $class = $infos->getEmbeddedClass();
                    if (is_object($embeddedValue) && false !== ($realClass = get_class($embeddedValue))) {
                        $class = $realClass;
                    }
                    if (!class_exists($class)) {
                        $class = $this->classMetadata->getNamespace() . "\\" . $class;
                    }
                    $array[$key] = $this->getHydrator($class)->unhydrate($embeddedValue);
                }
                $value = $array;
            }

            if (is_object($value) && null != ($refInfos = $infos->getReferenceInfo()) && !$refInfos->getIsMultiple() && !$value instanceof \MongoDB\BSON\ObjectId) {
                $class = $refInfos->getDocument();
                if (!class_exists($class)) {
                    $class = $this->classMetadata->getNamespace() . "\\" . $class;
                }

                $value = $this->getHydrator($class)->unhydrate($value)["_id"];
            }

            if (is_array($value) && null != ($refInfos = $infos->getReferenceInfo()) && $refInfos->getIsMultiple()) {
                $array = [];
                foreach ($value as $referedValue) {
                    $class = $refInfos->getDocument();
                    if (!class_exists($class)) {
                        $class = $this->classMetadata->getNamespace() . "\\" . $class;
                    }
                    if (!$value instanceof \MongoDB\BSON\ObjectId) {
                        $array[] = $this->getHydrator($class)->unhydrate($referedValue)["_id"];
                    } else {
                        $array[] = $value;
                    }
                }
                $value = $array;
            }

            if ($value instanceof \DateTime) {
                $value = new \MongoDB\BSON\UTCDateTime($value->getTimestamp() * 1000);
            }

            $datas[$infos->getField()] = $value;
        }

        return $datas;
    }
267792
public function extract($object)
    {
        if (!$object instanceof CountryEntityInterface) {
            throw new Exception\InvalidArgumentException('$object must be an instance of DelCountriesFlags\Entity\CountryInterface');
        }
        /* @var $object CountryInterface*/
        $data = parent::extract($object);
        return $data;
    }
369339
public static function query($object = null)
    {
        if($object)
        {
            $class = BeanFactory::getObjectClass($object);
        }
        else
        {
            $class = static::__getRealClassName();
        }
        return Db::query(ModelManager::getDbPoolName($class), $class)->table(ModelManager::getTable($class));
    }