Get object base.
@param  string $objectName
@param  bool   $endOnly
@return string
509729
public function getObjectBase(string $objectName, bool $endOnly = true): string
    {
        $tmp = explode('\\', $objectName);
        $end = array_pop($tmp);

        if ($endOnly) {
            return $end;
        }

        // eg: froq\app\library\entity\UserEntity => app/library/entity/UserEntity
        $path = join('\\', array_slice($tmp, 3));

        return $path .'\\'. $end;
    }
990818
private function getObjectId($fieldName, $objectName = "object")
    {
        //====================================================================//
        // Load Pointed Object
        $object = $this->{$objectName}->{ "get".$fieldName}();
        //====================================================================//
        // Check Pointed Object Exists & Has an Id
        if (!$object || !method_exists($object, "getId") || !$object->getId()) {
            return null;
        }
        //====================================================================//
        // Return Object Id
        return (string) $object->getId();
    }
314836
public function __getSerialisablePropertyValue($propertyName)
    {
        try {
            return parent::__getSerialisablePropertyValue($propertyName);
        } catch (PropertyNotReadableException $e) {
            if ($this->__strictMode) {
                throw $e;
            } else {
                return null;
            }
        }
    }
712716
static function fetchObjectVersionList( $urlID, $parameters = false )
    {
        $objectVersionList = array();
        $urlObjectLinkList = eZPersistentObject::fetchObjectList( eZURLObjectLink::definition(),
                                                                   null,
                                                                   array( 'url_id' => $urlID ),
                                                                   null,
                                                                   $parameters,
                                                                   true );
        $storedVersionList = array();
        foreach ( $urlObjectLinkList as $urlObjectLink )
        {
            $objectAttributeID = $urlObjectLink->attribute( 'contentobject_attribute_id' );
            $objectAttributeVersion = $urlObjectLink->attribute( 'contentobject_attribute_version' );
            $objectAttribute = eZContentObjectAttribute::fetch( $objectAttributeID, $objectAttributeVersion );
            if ( $objectAttribute ) // Object and version has been deleted
            {
                $objectID = $objectAttribute->attribute( 'contentobject_id' );
                $objectVersion = $objectAttribute->attribute( 'version' );
                $object = eZContentObject::fetch( $objectID );
                if ( $object )
                {
                    $versionObject = $object->version( $objectVersion );
                    if ( $versionObject and !in_array( $versionObject->attribute( 'id' ), $storedVersionList ) )
                    {
                        $objectVersionList[] = $versionObject;
                        $storedVersionList[] = $versionObject->attribute( 'id' );
                    }
                }
            }
        }
        return $objectVersionList;
    }
756056
public function getFieldsByDatatype($objectName, $datatype)
    {
        $datatypeFieldConfigurations = array();

        $fieldConfigurations = $this->getFields($objectName);
        foreach ($fieldConfigurations as $fieldConfiguration) {
            if ($fieldConfiguration['datatype'] == $datatype) {
                $datatypeFieldConfigurations[] = $fieldConfiguration;
            }
        }

        return $datatypeFieldConfigurations;
    }
468046
public function getScope($objectName)
    {
        if (!isset($this->objects[$objectName])) {
            $hint = ($objectName[0] === '\\') ? ' Hint: You specified an object name with a leading backslash!' : '';
            throw new Exception\UnknownObjectException('Object "' . $objectName . '" is not registered.' . $hint, 1265367590);
        }
        return $this->objects[$objectName]['s'];
    }
808804
public function getBaseObject()
    {
        if (!$this->_oBaseObject) {
            $this->_oBaseObject = oxNew($this->_sObjectsInListName);
            $this->_oBaseObject->setInList();
            $this->_oBaseObject->init($this->_sCoreTable);
        }

        return $this->_oBaseObject;
    }
1296849
static function getObjectIdsInNodeSubTree($node)
    {
        $db = eZDB::instance();
        $nodePath =  $node->attribute( 'path_string' );
        $pathString = " path_string like '$nodePath%' AND ";

        $objectIDArray = $db->arrayQuery( "SELECT
                                           ezcontentobject.id
                                    FROM
                                           ezcontentobject_tree, ezcontentobject
                                    WHERE
                                          $pathString
                                          ezcontentobject_tree.contentobject_id=ezcontentobject.id AND
                                          ezcontentobject_tree.main_node_id=ezcontentobject_tree.node_id" );

        if ( count( $objectIDArray ) == 0 )
            return null;

        $objectSimpleIDArray = array();

        foreach ( $objectIDArray as $objectID )
        {
            $objectSimpleIDArray[] = $objectID['id'];
        }

        return $objectSimpleIDArray;
    }
480317
public function objectTypeDefinition(string $name): ?ObjectTypeDefinitionNode
    {
        return $this->objectTypeDefinitions()
            ->first(function (ObjectTypeDefinitionNode $objectType) use ($name): bool {
                return $objectType->name->value === $name;
            });
    }
704004
protected function getClassNameByInterface($interfaceName)
    {
        if (array_key_exists($interfaceName, $this->interfaceNameToClassName)) {
            return $this->interfaceNameToClassName[$interfaceName];
        }

        if (0 === $this->countObjectManagers) {
            $this->interfaceNameToClassName[$interfaceName] = false;
            return false;
        } elseif (1 === $this->countObjectManagers) {
            $this->interfaceNameToClassName[$interfaceName] = array_key_exists($interfaceName, $this->baseEntityMap) ? $this->baseEntityMap[$interfaceName] : false;
            return $this->interfaceNameToClassName[$interfaceName];
        }

        foreach ($this->objectManagerToEntityMap as $entityMap) {
            if (array_key_exists($interfaceName, $entityMap)) {
                $this->interfaceNameToClassName[$interfaceName] = $entityMap[$interfaceName];
                return $this->interfaceNameToClassName[$interfaceName];
            }
        }
        $this->interfaceNameToClassName[$interfaceName] = false;
        return $this->interfaceNameToClassName[$interfaceName];
    }
116278
protected function getGeneric($fieldName, $objectName = "object")
    {
        $this->out[$fieldName] = $this->{$objectName}->{ "get".$fieldName}();

        return $this;
    }
13574
protected function getGenericDate($fieldName, $objectName = "object")
    {
        $date = $this->{$objectName}->{ "get".$fieldName}();
        $this->out[$fieldName] = $date ? $date->format(SPL_T_DATECAST) : "";

        return $this;
    }
1232308
public function __getSerialisablePropertyValue($propertyName) {
        $map = $this->__getSerialisablePropertyMap();
        if (array_key_exists($propertyName, $map)) {
            return $map [$propertyName];
        } elseif (array_key_exists(substr(strtoupper($propertyName), 0, 1) . substr($propertyName, 1), $map)) {
            return $map [substr(strtoupper($propertyName), 0, 1) . substr($propertyName, 1)];
        } else {
            throw new PropertyNotReadableException (get_class($this), $propertyName);
        }
    }
39715
public function getPropertiesLoadedTogether($object, $propertyName)
    {
        $metadata = $this->getMetadata(get_class($object));
        return $metadata->getFieldsWithSameDataSource($propertyName);
    }
332253
public function getCacheKeyForObjectManagerName($objectManagerName)
    {
        if (array_key_exists($objectManagerName, $this->cacheKeys)) {
            return $this->cacheKeys[$objectManagerName];
        }

        $preffix = $this->getModuleOptions()->getEntityMapDoctrineCachePrefix();
        $key = $preffix . '_' . $objectManagerName;

        $this->cacheKeys[$objectManagerName] = $key;

        return $this->cacheKeys[$objectManagerName];
    }
445747
public function getObjectClass($distinguishedName)
    {
        $this->utilities()->validateNotNull('Distinguished Name [dn]', $distinguishedName);

        $result = $this->search()
            ->select('objectClass')
            ->where('distinguishedName', '=', $distinguishedName)
            ->first();

        if (is_array($result) && array_key_exists('objectclass', $result)) {
            return $result['objectclass'];
        }

        return false;
    }
779561
public function getBodyHtml($htmlOnly = false)
    {
        if ($htmlOnly && $this->_bodyHtml) {
            $body = $this->_bodyHtml;
            return $body->getContent();
        }

        return $this->_bodyHtml;
    }