Get object label.

@since  1.2.6

@param  mixed  $object Post or User

@return string         The object label.
357825
public function get_object_label( $object ) {
		if ( ! $this->do_type_label ) {
			return '';
		}

		$post_type_obj = get_post_type_object( $object->post_type );
		$label = isset( $post_type_obj->labels->singular_name ) ? $post_type_obj->labels->singular_name : $post_type_obj->label;

		return ' &mdash; <span class="object-label">'. $label .'</span>';
	}
1147980
protected function getQualifiedRelatedKeyName($object)
    {
        if (method_exists($object, 'getQualifiedRelatedKeyName')) {
            return $object->getQualifiedRelatedKeyName();
        }

        if (method_exists($object, 'getQualifiedRelatedPivotKeyName')) {
            return $object->getQualifiedRelatedPivotKeyName();
        }

        return $object->getOtherKey();
    }
389946
protected function getObjectDisplay($object = null)
    {
        if (!$object || !$object->isInDB()) {
            return '';
        }

        // Use image tag
        // TODO Use CMSThumbnail instead to limit max size, blocked by DataDifferencerTest and GC
        // not playing nice with mocked images
        if ($object instanceof Image) {
            return $object->getTag();
        }

        // Format title
        return $object->obj('Title')->forTemplate();
    }
129541
protected static function readObject($object): string
    {
        if ($object instanceof Closure) {
            return 'Function';
        }

        if ($object instanceof DateTime) {
            return sprintf('DateTime(%s)', $object->format('Y-m-d\TH:i:sP'));
        }

        if (method_exists($object, 'toString')) {
            return (string) $object->toString();
        }

        if (method_exists($object, '__toString')) {
            return (string) $object;
        }

        return sprintf('Object(%s)', get_class($object));
    }
16204
protected function getContentType(UserObject $object)
    {
        if (isset($object->data['content_type'])) {
            return $this->contentTypeService->loadContentTypeByIdentifier($object->data['content_type']);
        }

        return;
    }
332563
public static function getTable($object)
    {
        $tableAnnotation = static::getAnnotation($object, Table::class);
        if(null !== $tableAnnotation)
        {
            return $tableAnnotation->name;
        }
        else
        {
            return null;
        }
    }
580997
public static function getObjectClass($object)
    {
        if(is_object($object))
        {
            if($object instanceof IBean)
            {
                return get_parent_class($object);
            }
            else
            {
                return get_class($object);
            }
        }
        else
        {
            return (string)$object;
        }
    }
714872
public static function unsetLabel($label, $object)
    {
        $result = true;
        $labels = self::getLabels($object);
        if (array_key_exists($label, $labels)) {
            unset($labels[$label]);
            $object->insertToFlexiBee(['id' => $object->getMyKey(), 'stitky@removeAll' => 'true',
                'stitky' => $labels]);
            $result = ($object->lastResponseCode == 201);
        }
        return $result;
    }
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;
    }
666881
public function get(string $object)
    {
        return ($this->exists($object)) ? $this->registry[$object] : null;
    }
519478
public function getObjectValidator($object)
    {
        $class = get_class($object);
        if (!isset($this->validators[ $class ])) {
            $this->validators[ $class ] = $this->reader->getObjectValidator($object);
        }

        return $this->validators[ $class ];
    }
867778
protected function getQualifiedForeignKeyName($object)
    {
        if (method_exists($object, 'getQualifiedForeignKeyName')) {
            return $object->getQualifiedForeignKeyName();
        }

        if (method_exists($object, 'getQualifiedForeignPivotKeyName')) {
            return $object->getQualifiedForeignPivotKeyName();
        }

        return $object->getForeignKey();
    }
363235
protected function getIdentifier($object)
    {
        $property = new ReflectionProperty(get_class($object), $this->getPrimaryKey());
        $property->setAccessible(true);
        return $property->getValue($object);
    }
192582
public static function getClassName($object = null)
    {
        if (!is_object($object) && !is_string($object)) {
            return false;
        }

        $class = explode('\\', (is_string($object) ? $object : get_class($object)));
        return $class[count($class) - 1];
    }
1271047
public function getValue($object)
    {
        $this->reflectionProperty->setAccessible(true);

        return $this->reflectionProperty->getValue($object);
    }
1133180
public function getObjectState($object)
    {
        $oid = spl_object_hash($object);
        if (isset($this->objectsRepository[$oid])) {
            $repository = $this->objectsRepository[$oid];
            $data = $repository->getHydrator()->unhydrate($object);
            $id = isset($data['_id']) ? serialize($data['_id']) . $repository->getCollection() : $oid;

            if (isset($this->objectStates[$id])) {
                return $this->objectStates[$id];
            }
        }

        return null;
    }
716878
final public static function getAnnotation($object)
    {
        $funReflec = new FuncoesReflections();
        
        $output = array();
        
        $pattern = '/@+_+[A-z]\w+=\w+/';
        
        $fullComments = $funReflec->retornaComentariosAtributos($object);
        $attribuites   = $funReflec->pegaAtributosDoObjeto($object);
        
        $annotationsList = [];
        
        $limit    = count($attribuites);
        $iterator = 0;
        for ($iterator; $iterator < $limit; $iterator++) {
            
            preg_match_all(
                $pattern,
                $fullComments[$attribuites[$iterator]],
                $output
            );

            $annotationsList[ $attribuites[$iterator] ] = $output[0];
        }

        return $annotationsList;
    }