@param string $id

@return $this

@throws InvalidIdException
177788
public function setId($id)
    {
        $this->id = (string)$id;

        if (!$this->isIdValid($this->id)) {
            throw new InvalidIdException($this);
        }

        return $this;
    }
309706
public function delete($id)
    {
        if ($this->has($id)) {
            //remove instance
            unset($this->instances[$id]);

            //remove interface reference if exists
            foreach ($this->interfaces as $int => $classes) {
                $key = array_search($id, $classes);
                if ($key !== false) {
                    unset($classes[$key]);
                    $this->interfaces[$int] = $classes;
                }
            }

            //remove instance from singleton binding
            if ($this->hasDefinition($id)) {
                $definition = $this->getDefinition($id);
                if ($definition instanceof Singleton) {
                    $definition->deleteStoredInstance();
                }
            }
        }
        return $this;
    }
508790
public function setDatatableId($id)
    {
        if (!array_key_exists($id, self::$instances)) {
            self::$instances[$id] = $this;
        } else {
            throw new \Exception('Identifer already exists');
        }

        return $this;
    }
259195
public function setId($id = null) {

        if (
            $id === null ||
            is_bool($id) ||
            ( is_int($id) && $id > 0 ) ||
            ( is_string($id) && !empty($id) )
        ) {

            $this->id = $id;

        } else {

            throw new InvalidArgumentException("Invalid RPC id");

        }

        return $this;

    }
345320
public function & SetId ($id) {
		/** @var $this \MvcCore\Ext\Forms\IForm */
		$this->id = $id;
		self::$instances[$id] = & $this;
		return $this;
	}
755780
public function setId($id)
    {
        $id = (string)$id;

        if(!isset($this->__flywheelInitialId)) {
            $this->__flywheelInitialId = $id;
        }

        $this->__flywheelDocId = $id;

        return $id;
    }
302802
public function view($id)
    {
        $this->builder->setMode(Builder::MODE_VIEW);
        $this->builder->setResourceId($id);

        $this->setFieldValue($id);

        return $this;
    }
424449
public function setUserId(int $id)
    {

        // Has the id changed?
        if ($id !== $this->userId) {
            // Invalidate existing user
            if ($this->user !== null && $this->user->getId() !== $id) {
                $this->user = null;
            };

            $this->userId = $id;
        }

        return $this;
    }
907016
public function removeById($id)
    {
        if (isset($this->ids[$id])) {
            foreach ($this->ids[$id] as $alias) {
                unset($this->aliases[$alias]);
            }
            unset($this->ids[$id]);
        }

        return $this;
    }
171579
public function setId($id)
    {
        if (!empty($id) && is_string($id) && ctype_print($id)) {
            $this->id = trim($id);
        }

        return $this;
    }
947584
public function load($id)
    {
        if (!$this->controller) {
            throw $this->exception('Unable to load model, setSource() must be set');
        }

        if ($this->loaded()) {
            $this->unload();
        }
        $this->hook('beforeLoad', array('load', array($id)));

        $this->controller->loadById($this, $id);

        $this->endLoad();

        return $this;
    }
635054
public function get($id)
    {
        if (!$this->has($id)) {
            throw new \InvalidArgumentException(sprintf('Configuration "%s" not found.', $id));
        }

        return $this->configurations[$id];
    }
1277417
public function deleteById($id)
    {
        $model = $this->getById($id);

        if (empty($model))
            return $this;

        if ($this instanceof \JanDolata\CrudeCRUD\Engine\Interfaces\WithFileInterface) {
            $fileAttrName = $this->fileAttrName;
            $modelFiles = $model->$fileAttrName;

            foreach ($modelFiles as $file)
                $this->deleteFileByData($model->id, $file['file_log_id']);
        }

        $model->delete();

        if ($this->canOrder())
            $this->resetOrder();

        return $this;
    }
680194
public function setId($id) : self
    {
        if (!is_string($id) && !is_int($id)) {
            throw new InvalidArgumentException('Id must be either an int or a string');
        }

        $this->id = $id;

        return $this;
    }
1031118
public function setQueueId($id)
    {
        if ($id === null) {
            $this->queueId = null;
            return $this;
        }

        if (!is_string($id)) {
            throw new InvalidArgumentException(
                'Queue ID must be a string'
            );
        }

        $this->queueId = $id;

        return $this;
    }
1232481
public function get($id): ProxyInterface
    {
        if (!$this->has($id)) {
            throw new InvalidIdentifierException(
                sprintf(
                    'Cannot find mock object with identifier "%s"',
                    $id
                )
            );
        }

        return $this->mocks[$id];
    }
1091433
final public function load($id = null)
    {
        if ($id === null) {
            $id = $this->id();
        }
        $this->source()->loadItem($id, $this);
        return $this;
    }