Returns AbstractPropertyStorage instance by PropertyStorage.id
@param integer $id
@return \DevGroup\DataStructure\propertyStorage\AbstractPropertyStorage
@throws ServerErrorHttpException
191160
public static function storageById($id)
    {
        $handlers = self::storageHandlers();
        if (isset($handlers[$id])) {
            return $handlers[$id];
        } else {
            throw new ServerErrorHttpException("Storage handler with id $id not found.");
        }
    }
99464
public function offsetGet($id)
    {
        if (!array_key_exists($id, $this->container)) {
            throw new InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id));
        }

        return $this->container[$id] instanceof Closure ? $this->container[$id]($this) : $this->container[$id];
    }
915184
public function getContentTypeById($id)
    {
        return $this->om->getRepository($this->configurationManager->getEntityClass('content_type'))->find($id);
    }
20558
public function find(int $id)
    {
        return $this->cache->tags($this->getModel())->remember($id, 60, function () use ($id) {
            return $this->repository->find($id);
        });
    }
1099115
public function lookup($id) {
        if ($pos = strpos($id, ',')) {
            $id = substr($id, 0, $pos);
        }

        $cacheKey = 'volume_' . $id;

        if ($this->cache && $this->cache->has($cacheKey)) {
            $val = $this->cache->get($cacheKey);

            if (!$val instanceof Volume) {
                $val = new Volume($val);
            }

            return $val;
        }

        $res = $this->client->get($this->buildMasterUrl(self::DIR_LOOKUP), [
            'query' => [ 'volumeId' => $id ]
        ]);

        if ($res->getStatusCode() != 200) {
            throw new SeaweedFSException('Unexpected response when looking up volume: ' . $res->getStatusCode());
        }

        $body = json_decode((string) $res->getBody());

        $volume = new Volume($body);

        if ($this->cache) {
            $this->cache->put($cacheKey, $volume);
        }

        return $volume;
    }
137962
public function getOrFail($id)
    {

        if ($model = $this->get($id)) {
            return $model;
        }

        $typeName = Type::of($this->prototype());

        throw new ResourceNotFoundException("$typeName #$id not found.");
    }
1362693
public function store($id)
    {
        $block = $this->getBlock($id);
        if (!empty($block)) {
            $this->authorize('create', $block);
            $this->authorize('update', $block);
            $input       = $this->validator->validate('create');
            $translation = $this->repository->createTranslation($block, $input);
            return $this->respondWithSuccess($translation, new BlockTranslationTransformer);
        }
        return $this->respondNotFound();
    }
918694
public function getById($id)
    {
        $id = (int) $id;
        $rowSet = $this->getTableGateway()->select([$this->getPrimaryKey() => $id]);
        $row = $rowSet->current();
        return $row;
    }
1066609
public static function getInstance($id = '0')
    {
        self::$id = $id;
        if (isset(self::$instances[self::$id])) {
            return self::$instances[self::$id];
        }

        return self::$instances[self::$id] = new self;
    }
1329477
public static function getInstance($id)
	{
		static $locales=array();
		if(isset($locales[$id]))
			return $locales[$id];
		else
			return $locales[$id]=new CLocale($id);
	}
1080720
public function actionImage($id)
    {
        $model = StorageImage::find()->where(['id' => $id])->with(['file'])->one();

        if (!$model) {
            throw new NotFoundHttpException("Unable to find the given storage image.");
        }

        return $model;
    }
194063
public function getById($id)
    {
        $certificate = $this->adapter->get(sprintf('%s/certificates/%s', $this->endpoint, $id));

        $certificate = json_decode($certificate);

        return new CertificateEntity($certificate->certificate);
    }
631904
public function select($id = null)
    {
        if ($id instanceof UploadedFile) {
            if (!$id->isValid()) {
                throw new \InvalidArgumentException('Upload was not successful');
            }

            $newFile = $id->move($this->targetDirectory, $this->generateTargetFilename($id));

            $selection = new StorageSelection(
                new \SplFileInfo($newFile),
                $this->targetDirectory.'/'.$newFile->getFilename(),
                $id->getClientOriginalName());

            return $selection;
        }

        return parent::select($id);
    }
349067
public static function factory ($id)
    {
        // Which class to instantiate
        $entityClassName = get_called_class();

        // Get object cache registry
        $ObjectRegistry  = \Teon\ObjectRegistry\ObjectRegistry::getInstance();

        // If this object already in cache, use that
        if ($ObjectRegistry->exists($entityClassName, $id)) {
            return $ObjectRegistry->get($entityClassName, $id);
        }

        // If not, instantiate new, store in object registry and return it
        $Object = new $entityClassName($id);
        $ObjectRegistry->store($Object);
        return $Object;
    }
6218
public function select($id = null)
    {
        if ($id instanceof \SplFileInfo) {
            $selection = new StorageSelection($id, $id->getRealPath(), $id->getFilename());

            return $selection;
        } elseif (is_string($id)) {
            if (!file_exists($id)) {
                throw new \InvalidArgumentException('id is not a valid file path: '.$id);
            }
            $selection = new StorageSelection(new \SplFileInfo($id), realpath($id), $id);

            return $selection;
        } elseif ($id instanceof StorageSelection) {
            return $id;
        }

        throw new \InvalidArgumentException('Id must be a string, an instance of SplFileInfo or a StorageSelection. Was: '.print_r($id, true));
    }
89718
public static function getInstance($id)
    {
        $instance = NULL;
        if (array_key_exists($id, self::$_instances))
        {
            $instance = self::$_instances[$id];
        }
        else
        {
            $instance = self::$_current_instance;
        }

        if (is_null($instance))
        {
            throw new \Exception('No instance found for datatable, you should set a datatable id in your
            action with "setDatatableId" using the id from your view ');
        }

        return $instance;
    }
518985
public function getPropertySet($id)
    {
        $ps = null;

        try {
            $ps = $this->getPersistence()->getPropertySet($id);
        } catch (StoreException $e) {
            $errMsg = sprintf(
                'Ошибка при получение PropertySet для экземпляра workflow c id# %s',
                $id
            );
            $this->getLog()->error($errMsg, [$e]);
        }

        return $ps;
    }