Get Tag Data Of Specific Object

note: use ETag to attain target object for
performance

@param $object

@throws \Exception Object not stored
@return array
775375
function getData($object)
    {
        if (! $this->has($object) )
            throw new \Exception('Object Not Found.');


        $hash = $this->genETag($object);
        return $this->_objs[$hash]['data'];
    }
566207
public function get($object) : array
    {
        $values = $this->storage->get($object);

        return ($values === null) ? [] : $values;
    }
1026854
public static function object2array($object)
    {
        $result = null;
        if (is_object($object)) {
            $objectData = get_object_vars($object);
            if (is_array($objectData) && count($objectData)) {
                $result = array_map('self::object2array', $objectData);
            }
        } else {
            if (is_array($object)) {
                foreach ($object as $item => $value) {
                    $result[$item] = self::object2array($value);
                }
            } else {
                $result = $object;
            }
        }

        return $result;
    }
271480
public static function getSerializables($object)
    {
        $annotation = static::getAnnotation($object, Serializables::class);
        if(null !== $annotation)
        {
            return $annotation;
        }
        else
        {
            return null;
        }
    }
962055
public function getLabeledPropertiesToBeSet($object)
    {
        return array_filter($this->getLabeledProperties(), function (LabeledPropertyMetadata $labeledPropertyMetadata) use ($object) {
            return true === $labeledPropertyMetadata->getValue($object);
        });
    }
1295218
public function getIdentifierValues($object)
    {
        $fields = $this->getReflectionFields();
        return $fields[$this->identifierPropertyName]->getValue($object);
    }
1218904
public static function getExtractPropertys($object)
    {
        $list = AnnotationManager::getPropertiesAnnotations(BeanFactory::getObjectClass($object), ExtractProperty::class);
        if(null !== $list)
        {
            return $list;
        }
        else
        {
            return [];
        }
    }
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;
    }
41406
public function persistObject($object) : array
    {
        $data = $this->preparePersistChangeSet($object);

        $class = $this->getClassMetadata();

        if (! isset($data[$class->getIdentifier()[0]])) {
            $data[$class->getIdentifier()[0]] = $this->generateNextId($class);
        }

        $this->objects[$data[$class->getIdentifier()[0]]] = $data;

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

        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;
    }
496920
public function get($object)
    {
        // search for the correct serializer
        if (is_string($object)) {
            if ($meta = $this->om->getClassMetaData($object)) {
                $object = $meta->name;
            }
        }

        foreach ($this->serializers as $serializer) {
            $className = $this->getSerializerHandledClass($serializer);

            if ($object instanceof $className || $object === $className) {
                return $serializer;
            }
        }

        $className = is_object($object) ? get_class($object) : $object;

        throw new \Exception(
            sprintf('No serializer found for class "%s" Maybe you forgot to add the "claroline.serializer" tag to your serializer.', is_string($object) ? $object : get_class($object))
        );
    }
1366887
protected function _collectTags($object)
    {
        // Clear category cache for new products
        if ($this->_isForUpdate && !$object->getId()) {
            $result = array();
            foreach ($object->getCategoryIds() as $categoryId) {
                $result[] = EcomDev_Varnish_Model_Processor_Category::TAG_PREFIX . $categoryId;
            }
            return $result;
        }
        
        return self::TAG_PREFIX . $object->getId();
    }
908168
public function extract($object)
    {
        return [
            'name' => $object->getFileName(),
            'type' => $object->getType(),
            'size' => $object->getSize(),
            'tmp_name' => $object->getTempName(),
            'error' => $object->getError(),
            'size' => [
                0 => $object->getWidth(),
                1 => $object->getHeight(),
                2 => $object->getMimeType(),
            ],
        ];
    }
697013
public function extract($object)
    {
        $data = [
            'revision_id' => $object->getRevision()->getId(),
            'name' => $object->getName(),
            'type' => $object->getType(),
            'ordering' => $object->getOrdering(),
            'include_pattern' => $object->getIncludePattern(),
            'exclude_pattern' => $object->getExcludePattern(),
        ];
        if ($object->getId()) {
            $data['id'] = $object->getId();
        }
        return $data;
    }
653590
public function getMetadataForObject($object)
    {
        if (!$object instanceof StructureBehavior) {
            return;
        }

        $documentMetadata = $this->metadataFactory->getMetadataForClass(get_class($object));
        $structure = $this->structureFactory->getStructureMetadata(
            $documentMetadata->getAlias(),
            $object->getStructureType()
        );

        return $this->getMetadata($documentMetadata, $structure);
    }
56840
static function all($object)
	{
		$bindings = bors_find_all('common_keyword_bind', array(
			'target_class_id' => $object->class_id(),
			'target_object_id' => $object->id(),
		));

		$keyword_ids = bors_field_array_extract($bindings, 'keyword_id');
		$keywords = bors_find_all(__CLASS__, array('id IN' => $keyword_ids));
		return bors_field_array_extract($keywords, 'title');
	}