@param $id

@return SplitDescriptor|null
@throws \OldTown\Workflow\Exception\ArgumentNotNumericException
964414
public function getSplit($id)
    {
        if (!is_numeric($id)) {
            $errMsg = 'Аргумент должен быть числом';
            throw new ArgumentNotNumericException($errMsg);
        }
        $id = (integer)$id;

        $splits = $this->getSplits();
        foreach ($splits as $splitDescriptor) {
            if ($id === $splitDescriptor->getId()) {
                return $splitDescriptor;
            }
        }

        return null;
    }
1358803
public function raw($id) {
		// Format id
		$id = $this->_format($id);
		// Verify existence
		if(!$this->has($id)) {
			throw new NotFoundException("'$id' value does not exist");
		}
		// Remove value
		return $this->values[$id]->getRawValue();
	}
449433
protected function getId($id = null)
    {
        $id = (empty($id)) ? $this->resourceId : $id;
        if (empty($id)) {
            throw new \Exception('Invalid id supplied [' . $id . ']. Operation requires valid resource id.');
        }

        return $id;
    }
311893
public function find($id)
    {
        $data = $this->client->get(Inflector::pluralize($this->getResourceName()).'/'.$id);

        return $this->fromArray(reset($data));
    }
714330
public function getPathForDocument($id)
    {
        if(!$this->validateId($id)) {
            throw new \Exception(sprintf('`%s` is not a valid document ID.', $id));
        }

        return $this->path . DIRECTORY_SEPARATOR . $this->getFilename($id);
    }
697961
public function getDefinition($id)
    {
        $id = strtolower($id);

        if (!isset($this->definitions[$id])) {
            throw new ServiceNotFoundException($id);
        }

        return $this->definitions[$id];
    }
1368794
protected function normalizeId($id)
    {
        if (null !== $this->getSessionPrefix()) {
            return $this->getSessionPrefix() . self::ID_SEPARATOR . $id;
        }

        return $id;
    }
42606
public function getScriptID($id)
	{
		// normalize id
		$id = $this->getCanonicalID($id);
		// find sub tags
		if(($underscorePosition=strpos($id, '_'))!==false)
		{
			$subTag = explode('_', $id);
			// script sub tags can be distinguished from territory sub tags by length
			if (strlen($subTag[1])===4)
			{
				$id = $subTag[1];
			}
			else
			{
				$id = null;
			}
		}
		else
		{
			$id = null;
		}
		return $id;
	}
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));
    }
807699
public function toSimpleWorkflow($id)
	{
		if ($id === null) {
			$id = self::VALUE_NULL;
		}
		$statusId = array_search($id, $this->_map);
		if ($statusId === false) {
			throw new Exception('Conversion to SimpleWorkflow failed : no value found for id = '.$id);
		}
		return ($statusId == self::VALUE_NULL ? null : $statusId);
	}
840959
private function getPrefixAndSid($id)
    {
        if (count($parts = explode('.', $id)) < 2) {
            return array(null, $id);
        }

        $sid    = array_pop($parts);
        $prefix = implode('.', $parts);

        return array($prefix, $sid);
    }
1155651
public function getStep($id)
    {
        if (!is_numeric($id)) {
            $errMsg = 'Аргумент должен быть числом';
            throw new ArgumentNotNumericException($errMsg);
        }
        $id = (integer)$id;

        foreach ($this->getSteps() as $step) {
            if ($id === $step->getId()) {
                return $step;
            }
        }
        return null;
    }
957
public function setId($id)
    {

        if (!is_null($id) && (!preg_match("/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/", $id))) {
            throw new \InvalidArgumentException("invalid value for $id when calling StackService., must conform to the pattern /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.");
        }

        $this->container['id'] = $id;

        return $this;
    }
756848
public function findByStringOrFail(string $id): Model
    {
        $model = $this->findByString($id);
        if (empty($model)) {
            throw new ResourceNotFoundException();
        }

        return $model;
    }
807257
public function getOrFail($id)
    {
        if (!$this->storage->offsetExists($id)) {
            throw new ResourceNotFoundException("Model with id #$id not found.");
        }
        return $this->deserializeFromStorage($this->storage->offsetGet($id));
    }
70616
public function loadContentfulEntry(string $id): ContentfulEntry
    {
        $idList = explode('|', $id);
        if (count($idList) !== 2) {
            throw new NotFoundException(
                sprintf(
                    'Item ID %s not valid.',
                    $id
                )
            );
        }

        $client = $this->getClientBySpaceId($idList[0]);

        if ($client === null) {
            throw new NotFoundException(
                sprintf(
                    'Item ID %s not valid.',
                    $idList[0]
                )
            );
        }

        $contentfulEntry = $this->findContentfulEntry($id);

        if ($contentfulEntry instanceof ContentfulEntry) {
            $contentfulEntry->reviveRemoteEntry($client);
        } else {
            $contentfulEntry = $this->buildContentfulEntry(
                $client->getEntry($idList[1]),
                $id
            );
        }

        if ($contentfulEntry->getIsDeleted()) {
            throw new NotFoundException(
                sprintf(
                    'Entry with ID %s deleted.',
                    $id
                )
            );
        }

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

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

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

        throw new ResourceNotFoundException("$typeName #$id not found.");
    }