Returns the data associated to the given object.

If the given object is not in the storage, or has no associated data, NULL is returned.

@param object $object The object.

@return mixed The stored data.
1472
public function get($object)
    {
        $hash = spl_object_hash($object);

        if (isset($this->data[$hash])) {
            return $this->data[$hash];
        }

        return null;
    }
376469
public function extract($object)
    {
        $data = [
            'environment_id' => $object->getEnvironment()->getId(),
            'released_at' => $object->getReleasedAt() !== null ? $object->getReleasedAt()->format(self::SQL_FORMAT) : null,
            'released_by' => $object->getReleasedBy(),
            'comment' => $object->getComment()
        ];
        if ($object->getId()) {
            $data['id'] = $object->getId();
        }
        return $data;
    }
753929
public function extract($object)
    {
        $data = [
            'group_id' => $object->getGroup()->getId(),
            'name' => $object->getName(),
        ];
        if ($object->getId()) {
            $data['id'] = $object->getId();
        }
        return $data;
    }
61752
protected function getObjectValues(object $object): array
    {
        $class = new ReflectionClass(get_class($object));
        $constructor = $class->getConstructor();
        if ($constructor instanceof ReflectionMethod) {
            foreach ($constructor->getParameters() as $parameter) {
                $name = $parameter->getName();

                $property = $class->getProperty($name);
                $property->setAccessible(true);

                $value = $property->getValue($object);
                if (is_object($value) === true) {
                    $value = $this->getObjectValues($value);
                }

                $data[$name] = $value;
            }
        }

        return $data ?? [];
    }
271480
public static function getSerializables($object)
    {
        $annotation = static::getAnnotation($object, Serializables::class);
        if(null !== $annotation)
        {
            return $annotation;
        }
        else
        {
            return null;
        }
    }
646212
public function getValue($object = null)
    {
        if (!is_object($object)) {
            throw new Exception('$object is of type ' . gettype($object) . ', instance of class ' . $this->class . ' expected.', 1210859212);
        }
        if ($this->isPublic()) {
            return parent::getValue($object);
        }

        parent::setAccessible(true);
        return parent::getValue($object);
    }
775375
function getData($object)
    {
        if (! $this->has($object) )
            throw new \Exception('Object Not Found.');


        $hash = $this->genETag($object);
        return $this->_objs[$hash]['data'];
    }
563078
public static function objectArray($object)
    {
        if (is_object($object)) {
            $reflectionClass = new \ReflectionClass(get_class($object));
            $array = [];
            foreach ($reflectionClass->getProperties() as $property) {
                $property->setAccessible(true);
                $array[$property->getName()] = $property->getValue($object);
                $property->setAccessible(false);
            }

            //If above method failed? try, this one.
            $array = (empty($array)) ? json_decode(json_encode($object), true) : $array;

            return $array;
        }

        return false;
    }
1355811
public function extract( $object )
    {
        $data = $this->getMapper()
                     ->extract( $object );

        if ( isset( $data['properties'] ) &&
             is_array( $data['properties'] ) )
        {
            foreach ( $data['properties'] as $key => $value )
            {
                $newKey = String::camelize( $key );

                if ( is_array( $value ) &&
                     array_key_exists( 'value', $value ) )
                {
                    $data['properties'][$key] = $value['value'];
                }

                if ( $newKey != $key )
                {
                    $data['properties'][$newKey] = $data['properties'][$key];
                    unset( $data['properties'][$key] );
                }
            }
        }

        return $data;
    }
1285087
public static function serialize($object) : array
    {
        $serializer = new static();
        $data = $serializer->serializeObject($object);

        if (sizeof($serializer->referencesUsed)) {
            foreach ($serializer->referencesUsed as $index) {
                $data['@references'][$index] = $serializer->references[$index];
            }
        }

        return $data;
    }
1131626
public function query($object) {
		$conditions = (array) $this->constraints();

		foreach ($this->key() as $from => $to) {
			if (!isset($object->{$from})) {
				return null;
			}
			$conditions[$to] = $object->{$from};

			if (is_object($conditions[$to]) && $conditions[$to] instanceof Countable) {
				$conditions[$to] = iterator_to_array($conditions[$to]);
			}
		}
		$fields = $this->fields();
		$fields = $fields === true ? null : $fields;
		return compact('conditions', 'fields');
	}
1307535
public function last($object = false)
    {
        $this->prepare();

        $data = $this->_map;
        if (count($data) > 0) {
            return $this->prepareResult(end($data), $object);
        }

        return null;
    }
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));
    }
474221
public static function get_for_object($object)
    {
        // Capture changesetitem for both changed and deleted objects
        $id = $object->isInDB()
            ? $object->ID
            : $object->OldID;
        return static::get_for_object_by_id($id, $object->baseClass());
    }
332563
public static function getTable($object)
    {
        $tableAnnotation = static::getAnnotation($object, Table::class);
        if(null !== $tableAnnotation)
        {
            return $tableAnnotation->name;
        }
        else
        {
            return null;
        }
    }
1132899
public function extract($object)
    {
        if (!$object instanceof News) {
            throw new \Exception('$object must be an instance of News');
        }
        /* @var $object News */
        $data = parent::extract($object);

        return $data;
    }
1148643
public static function getClassInformation($object)
    {
        $reflectionObject = new \ReflectionObject($object);
        $cacheId = md5("classInformation:" . $reflectionObject->getName());
        $classInfo = self::getFromCache($cacheId);
        if ($classInfo !== null) {
            return $classInfo;
        }

        $objectClasses = self::getClassesToRead($reflectionObject);
        $objectProperties = self::getProperties($objectClasses);
        $annotationReader = Configuration::getAnnotationReader();

        $classInfo = array(
            'accessProperties' => AccessReader::getAccessProperties($objectProperties, $annotationReader),
            'collectionsItemNames' => CollectionsReader::getCollectionsItemNames($objectProperties, $annotationReader),
            'associationsList' => AssociationReader::getAssociations($objectProperties, $annotationReader),
            'constraintsValidationEnabled' => ConstraintsReader::isConstraintsValidationEnabled($objectClasses, $annotationReader),
            'initialPropertiesValues' => AutoConstructReader::getPropertiesToInitialize($objectProperties, $annotationReader),
            'initializationNeededArguments' => AutoConstructReader::getConstructArguments($objectClasses, $annotationReader)
        );

        self::saveToCache($cacheId, $classInfo);

        return $classInfo;
    }