Boots up an object and stores.

@since 1.0.0

@param  string   $key    Object key.
@param  object   $object Definition for this instance.
5159
public function store(string $key, $object)
    {
        if (isset($this->aliases[$key])) {
            $key = $this->aliases[$key];
        }

        $this->store[$key] = $object;
    }
217000
public void put(String key, T object) {
        // Synchronize put on each entry. Gives concurrent editions on different entries, and atomic
        // modification on the same entry.
        if (ramMode.equals(DualCacheRamMode.ENABLE_WITH_REFERENCE)) {
            ramCacheLru.put(key, object);
        }

        String ramSerialized = null;
        if (ramMode.equals(DualCacheRamMode.ENABLE_WITH_SPECIFIC_SERIALIZER)) {
            ramSerialized = ramSerializer.toString(object);
            ramCacheLru.put(key, ramSerialized);
        }

        if (diskMode.equals(DualCacheDiskMode.ENABLE_WITH_SPECIFIC_SERIALIZER)) {
            try {
                dualCacheLock.lockDiskEntryWrite(key);
                DiskLruCache.Editor editor = diskLruCache.edit(key);
                if (ramSerializer == diskSerializer) {
                    // Optimization if using same serializer
                    editor.set(0, ramSerialized);
                } else {
                    editor.set(0, diskSerializer.toString(object));
                }
                editor.commit();
            } catch (IOException e) {
                logger.logError(e);
            } finally {
                dualCacheLock.unLockDiskEntryWrite(key);
            }
        }
    }
95239
void setAnnotation(String key, Object object) {
    checkArgument(object != null, "The stored annotation value cannot be null.");
    Preconditions.checkArgument(
        !annotationMap.containsKey(key), "Cannot overwrite the existing annotation '%s'.", key);
    annotationMap.put(key, object);
  }
728151
private function array_insert(mixed $object, string $key, int $position) : void
    {
        if (0 == count($this->members)) {
            // The array is empty so just add the item
            $this->members[$key] = $object;
        } elseif ($position == count($this->members)) {
            // The item goes at the end of the array
            $this->members[$key] = $object;
        } else {
            $this->members = array_slice($this->members, 0, $position,
                    true) + array($key => $object) + array_slice($this->members, $position, null, true);
        }
    }
1050023
public function add($object, $value) : void
    {
        $values = $this->get($object);
        $values[] = $value;
        $this->storage->set($object, $values);
    }
273782
public function remove($object)
    {
        $this->hasUnpersistedChanges = true;
        if ($this->addedObjects->contains($object)) {
            $this->addedObjects->detach($object);
        } else {
            $this->removedObjects->attach($object);
        }
    }
665713
public function add($object)
    {
        if (!$this->isNewObject($object)) {
            throw new KnownObjectException('The object of type "' . get_class($object) . '" (identifier: "' . $this->getIdentifierByObject($object) . '") which was passed to EntityManager->add() is not a new object. Check the code which adds this entity to the repository and make sure that only objects are added which were not persisted before. Alternatively use update() for updating existing objects."', 1337934295);
        } else {
            try {
                $this->entityManager->persist($object);
            } catch (\Exception $exception) {
                throw new PersistenceException('Could not add object of type "' . get_class($object) . '"', 1337934455, $exception);
            }
        }
    }
379281
protected function beforeObjectIsStored($object)
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException(sprintf('You must only pass object to this container (%s), "%s" passed as parameter!', get_called_class(), gettype($object)), __LINE__);
        }
        $instanceOf = $this->objectClass();
        if (get_class($object) !== $this->objectClass() && !$object instanceof $instanceOf) {
            throw new \InvalidArgumentException(sprintf('Model of type "%s" does not match the object contained by this class: "%s"', get_class($object), $this->objectClass()), __LINE__);
        }
    }
1348885
public static function bind($key, $object = null)
    {
        if(is_array($key))
        {
            foreach($key as $key => $object)
            {
                self::$bindings[$key] = $object;
            }
        }
        else
        {
            self::$bindings[$key] = $object;
        }
    }
452929
public function remove($object)
    {
        foreach (array_keys($this->dataPlaceHolder) as $k) {
            if ($this->dataPlaceHolder[$k] === $object) {
                unset($this->dataPlaceHolder[$k]);

                return;
            }
        }
    }
523761
public function add($object)
    {
        if (!is_object($object) || !($object instanceof $this->objectType)) {
            $type = (is_object($object) ? get_class($object) : gettype($object));
            throw new IllegalObjectTypeException('The value given to add() was ' . $type . ' , however the ' . get_class($this) . ' can only store ' . $this->objectType . ' instances.', 1517408062);
        }
        $this->entityManager->persist($object);
    }
546957
protected function doAdd($object)
    {
        $this->notifyAccess();
        $this->objectsArray[$this->total] = $object;
        $this->total++;
    }
871081
public function save($object)
    {
        if (method_exists($object, 'getContenttype')) {
            $entityName = $object->getContenttype();
        } else {
            $entityName = get_class($object);
        }
        $repo = $this->getRepository($entityName);

        return $repo->save($object);
    }
808171
public static function runGetter(&$object, string $key)
    {
        $methodName = static::getMethodName($key, 'get');
        if (method_exists($object, $methodName)) {
            return $object->$methodName();
        }
        return null;
    }
958346
public function copyData($object)
    {
        if ($object instanceof CNabuDataObject) {
            $this->data = $object->data;
        } elseif (is_array($object)) {
            $this->data = $object;
        }
    }
1071491
public function setObject($object)
    {
        if (!($object instanceof IRI) && !($object instanceof Value)) {
            throw new \InvalidArgumentException('Object must be an IRI or Value object');
        }

        $this->object = $object;
    }
239680
public function initializeObject()
    {
        if (file_exists($this->keystorePathAndFilename)) {
            $this->keys = unserialize(file_get_contents($this->keystorePathAndFilename));
        }
        $this->saveKeysOnShutdown = false;
    }