Добавляет объект со связанными данными
@param IObject $object
@param mixed $linkedData
@return bool false, если объект существовал в хранилище
760228
protected function attachObjectToStorage(IObject $object, $linkedData = null)
    {
        $result = false;
        if (!$this->set->contains($object)) {
            $result = true;
            $this->iteratorArray[] = $object;
            $this->set->attach($object, $linkedData);
        } elseif (!is_null($linkedData)) {
            $this->set->attach($object, $linkedData);
        }

        return $result;
    }
593252
public function isValidType($object): bool
    {
        if ($this->type == null || $object == null) {
            return true;
        }

        if (is_object($object) && get_class($object) == $this->type) {
            return true;
        }

        return (MDataType::getType($object) == $this->type);
    }
154613
private function getCachedDataByObject($object)
    {
        return $this->getCachedDataByReference(
            $this->mm->getMetadataForObject($object)->getReferenceForObject($object)
        );
    }
1174497
public function appendLinkObject($key, LinkObject $linkObject) {
		Validator::checkMemberName($key);
		
		if (isset($this->links[$key]) === false) {
			$this->addLinksArray($key, new LinksArray());
		}
		elseif ($this->links[$key] instanceof LinksArray === false) {
			throw new DuplicateException('can not add to key "'.$key.'", it is not an array of links');
		}
		
		$this->links[$key]->addLinkObject($linkObject);
	}
1101437
public function mergeBlueObject(Container $object)
    {
        $newData = $object->toArray();

        foreach ($newData as $key => $value) {
            $this->appendData($key, $value);
        }

        $this->_dataChanged = true;
        return $this;
    }
568704
public function hydrate(array $data, $object)
    {
        if (isset($data['forge-name'])) {
            $object->setName($data['forge-name']);
        } elseif (isset($data['name'])) {
            $object->setName($data['name']);
        }
        if (isset($data['inherited'])) {
            $object->setInherited($data['inherited']);
        }
        if (isset($data['version'])) {
            $object->setVersion($data['version']);
        }
        if (isset($data['source'])) {
            $object->setSource($data['source']);
        }
        if (isset($data['project_page'])) {
            $object->setProjectPage($data['project_page']);
        }
        if (isset($data['issues_url'])) {
            $object->setIssuesUrl($data['issues_url']);
        }
        if (isset($data['author'])) {
            $object->setAuthor($data['author']);
        }
        if (isset($data['summary'])) {
            $object->setSummary($data['summary']);
        }
        if (isset($data['license'])) {
            $object->setLicense($data['license']);
        }
        return $object;
    }
1313535
public function hasObject($object)
    {
        $oid = spl_object_hash($object);
        if (!isset($this->objectsRepository[$oid])) {
            return false;
        }
        $repository = $this->objectsRepository[$oid];
        $data = $repository->getHydrator()->unhydrate($object);
        $id = isset($data['_id']) ? serialize($data['_id']) . $repository->getCollection() : $oid;

        return isset($this->objects[$oid]) || isset($this->objects[$id]);
    }
1175513
public function contains(KObjectHandlable $object)
    {
        $result = false;

        if($handle = $object->getHandle()) {
            $result = $this->__object_list->offsetExists($handle);
        }

        return $result;
    }
874794
public function cursorForObjectInConnection(array $data, $object): ? string
    {
        $offset = null;

        foreach ($data as $i => $entry) {
            // When using the comparison operator (==), object variables are compared in a simple manner,
            // namely: Two object instances are equal if they have the same attributes and values,
            // and are instances of the same class.
            if ($entry == $object) {
                $offset = $i;
                break;
            }
        }

        if (null === $offset) {
            return null;
        }

        return $this->offsetToCursor($offset);
    }
269191
static function typeForObject( $object )
    {
        if ( !$object )
            return false;
        $class = $object->contentClass();
        if ( !$class )
            return false;

        $ini = eZINI::instance( 'collect.ini' );
        $typeList = $ini->variable( 'InfoSettings', 'TypeList' );

        $classID = $class->attribute( 'id' );
        $classIdentifier = $class->attribute( 'identifier' );

        $type = false;

        if ( isset( $typeList[$classID] ) )
            $type = $typeList[$classID];
        else if ( isset( $typeList[$classIdentifier] ) )
            $type = $typeList[$classIdentifier];

        $typeAttribute = $ini->variable( 'InfoSettings', 'TypeAttribute' );
        if ( $typeAttribute )
        {
            $dataMap = $object->attribute( 'data_map' );
            if ( isset( $dataMap[$typeAttribute] ) )
            {
                $type = $dataMap[$typeAttribute]->content();
                if ( is_array( $type ) or
                     is_object( $type ) )
                    $type = false;
            }
        }

        if ( !$type )
            $type = $ini->variable( 'InfoSettings', 'Type' );

        return $type;
    }
685571
public function map($object, $data)
    {
        $object
            ->setProductId($data['OXID'])
            ->setRatingAverage($data['OXRATING'])
            ->setRatingCount($data['OXRATINGCNT']);

        return $object;
    }
716585
public function getActivityData(KModelEntityInterface $object, KObjectIdentifierInterface $subject, $action = null)
    {
        $data = array(
            'application' => $subject->domain,
            'type'        => $subject->type,
            'package'     => $subject->package,
            'name'        => $subject->name,
        );

        if (is_array($this->_title_column))
        {
            foreach ($this->_title_column as $title)
            {
                if ($object->{$title})
                {
                    $data['title'] = $object->{$title};
                    break;
                }
            }
        }
        elseif ($object->{$this->_title_column}) {
            $data['title'] = $object->{$this->_title_column};
        }

        if (!isset($data['title'])) {
            $data['title'] = '#' . $object->id;
        }

        $data['row'] = $object->id;

        return $data;
    }
1127513
function Equals(TableObject $object = null)
    {
        if (!$object)
            return false;

        if (get_class($this) == get_class($object))
            return $this->KeyValue() == $object->KeyValue();

        return $this === $object;
    }
1326078
protected function createObject($oData, $bReturnObject = false)
    {
        $aData = [
            'bucket_id'        => $oData->bucket->id,
            'filename'         => $oData->filename,
            'filename_display' => $oData->name,
            'mime'             => $oData->mime,
            'filesize'         => $oData->filesize,
            'md5_hash'         => $oData->md5_hash,
            'driver'           => $this->oEnabledDriver->slug,
        ];

        // --------------------------------------------------------------------------

        if (isset($oData->img->width) && isset($oData->img->height) && isset($oData->img->orientation)) {
            $aData['img_width']       = $oData->img->width;
            $aData['img_height']      = $oData->img->height;
            $aData['img_orientation'] = $oData->img->orientation;
        }

        // --------------------------------------------------------------------------

        //  Check whether file is animated gif
        if ($oData->mime == 'image/gif') {
            if (isset($oData->img->is_animated)) {
                $aData['is_animated'] = $oData->img->is_animated;
            } else {
                $aData['is_animated'] = false;
            }
        }

        // --------------------------------------------------------------------------

        $oObjectModel = Factory::model('Object', 'nails/module-cdn');
        $iObjectId    = $oObjectModel->create($aData);

        if ($iObjectId) {
            return $bReturnObject ? $this->getObject($iObjectId) : $iObjectId;
        } else {
            return false;
        }
    }
1160491
public static function setDataOptionAttributes($data, $object)
    {
        if(is_array($data) && count($data) > 0)
        {
            $keys = array_keys($data);

            $response = '';
            foreach($keys as $key)
            {
                $response .= ' data-' . $key . '="' . $object->{$data[$key]} . '"';
            }

            return $response;
        }

        return null;
    }
64
function relatedObjects()
    {
        $return = false;
        if ( $this->ObjectAttributeID )
        {
            $return = array();

            // Fetch words
            $db = eZDB::instance();

            $wordArray = $db->arrayQuery( "SELECT * FROM ezkeyword_attribute_link
                                           WHERE objectattribute_id='" . $this->ObjectAttributeID ."' " );

            $keywordIDArray = array();
            // Fetch the objects which have one of these words
            foreach ( $wordArray as $word )
            {
                $keywordIDArray[] = $word['keyword_id'];
            }

            $keywordCondition = $db->generateSQLINStatement( $keywordIDArray, 'keyword_id' );

            if ( count( $keywordIDArray ) > 0 )
            {
                $objectArray = $db->arrayQuery( "SELECT DISTINCT ezcontentobject_attribute.contentobject_id FROM ezkeyword_attribute_link, ezcontentobject_attribute
                                                  WHERE $keywordCondition AND
                                                        ezcontentobject_attribute.id = ezkeyword_attribute_link.objectattribute_id
                                                        AND  objectattribute_id <> '" . $this->ObjectAttributeID ."' " );

                $objectIDArray = array();
                foreach ( $objectArray as $object )
                {
                    $objectIDArray[] = $object['contentobject_id'];
                }

                if ( count( $objectIDArray ) > 0 )
                {
                    $aNodes = eZContentObjectTreeNode::findMainNodeArray( $objectIDArray );

                    foreach ( $aNodes as $key => $node )
                    {
                        $theObject = $node->object();
                        if ( $theObject->canRead() )
                        {
                            $return[] = $node;
                        }
                    }
                }
            }
        }
        return $return;
    }
605297
public function dequeue( KObjectHandlable $object)
    {
        $result = false;

        if($handle = $object->getHandle())
        {
            if($this->__object_list->offsetExists($handle))
            {
                $this->__object_list->offsetUnset($handle);
                $this->__priority_list->offsetUnSet($handle);

                if($object instanceof KObjectInterface) {
                    unset($this->__identifier_list[$handle]);
                }

                $result = true;
            }
        }

        return $result;
    }