Return constant name from SID.

@param int $id SID to find

@return string Name of constant.
@throws SidItemNotFound
332295
public static function getNameById($sid)
    {
        $list = self::getList(true);
        $key = array_search($sid, $list);
        if ($key === false)
            throw new SidItemNotFound('Sid not exists');

        return $key;
    }
565748
public function find($id)
    {
        $response = $this->ontraport->get(
            $this->getSingularNamespace(), $this->toArray(compact('id'))
        );

        return $this->ontraport->item($this, $response);
    }
777374
public function getItem($id)
    {
        foreach ($this->entity->getItems() as $item) {
            if ($item->getId() === $id) {
                return $item;
            }
        }

        return null;
    }
696811
public static function find($id)
    {
        $item = Configs::authManager()->getRule($id);
        if ($item !== null) {
            return new static($item);
        }

        return null;
    }
30810
protected function _id($id)
    {
        if (($id !== null) && isset($this->_options['cache_id_prefix'])) {
            return $this->_options['cache_id_prefix'] . $id; // return with prefix
        }
        return $id; // no prefix, just return the $id passed
    }
925952
private function getEnumById($id)
    {
        if (!$enum = SchemaStore::getEnumById($id, true)) {
            throw new \InvalidArgumentException(sprintf(
                'Cannot find an enum with id "%s"',
                $id
            ));
        }

        return $enum;
    }
35753
public function findEntityById($id)
    {
        $item = $this->itemRepository->find($id);
        if (!$item) {
            return null;
        }

        return $item;
    }
245251
public function findCacheById(int $id)
    {

        // Check if already in addToCache
        if ($this->isCachedById($id)) {
            return $this->cacheById[$id];
        }

        return null;
    }
1074499
public function getItemById($id)
    {
        $items = $this->getItems();
        if (isset($items[$id])) {
            return $items[$id];
        }

        return null;
    }
300158
public function getNameById($id, $default = null)
    {
        $keyMap = $this->getHandler()->getKeyMap();
        if (empty($keyMap)) {
            return $default;
        }
        foreach ($keyMap as $name => $value) {
            if (isset($value['id']) && $value['id'] == $id) {
                return $name;
            }
        }
        return $default;
    }
104691
public static function find($id)
	{
		$object = new static;
		$response = $object->request('GET', sprintf('%s/%s', $object->getUrl(), $id));

		return $response ? $object : false;
	}
1193865
public static function find($id)
    {
        $item = UserRBACHelper::getAuthManager()->getRule($id);
        if ($item !== null) {
            return new static($item);
        }

        return null;
    }
3729
public function getResolved($id)
    {
        if (isset($this->extensions[$id])) {
            return $this->extensions[$id];
        } elseif (isset($this->composerNames[$id])) {
            $id = (string) $this->composerNames[$id];

            return $this->extensions[$id];
        }

        return null;
    }
1325216
public function findOneById($id)
    {
        $id = $this->idToMongo($id);

        if ($this->identityMap->has($id)) {
            return $this->identityMap->get($id);
        }

        return $this->createQuery(array('_id' => $id))->one();
    }
960746
private function getSharedItemKey(int $id): int
    {
        if ($id <= 0) {
            throw new \InvalidArgumentException('ID cannot be less or equals zero');
        }

        $st = @stat(__FILE__);
        if (!$st) {
            return -1;
        }

        //@TODO collisions? need more unique key
        $key = (int)sprintf("%u",
            (
                ($st['ino'] & 0xffff) |
                (($st['dev'] & 0xff) << 16) |
                (($id & 0xff) << 24)
            )
        );

        return $key;
    }
869943
public function getItem($id)
    {
        $file = PageRecordHelper::getFile($id);

        if (!is_file($file)) {
            return null;
        }

        $item = unserialize(file_get_contents($file));

        $item = new Data((array) $item);

        if (!$item->profiler) {
            $item->profiler = new NullObject();
        }

        if (!$item->collector) {
            $item->collector = new NullObject();
        }

        $item->id = $id;

        return $item;
    }
1076586
public static function getIdByName($name)
    {
        $title = strtoupper($name);

        $list = self::getList();
        if (!isset($list[ $title ]))
            throw new SidItemNotFound(get_called_class() . ":{$name} not exists");

        // todo Need to consider if to use ReflectionClass instead of arrays
        return $list[ $name ];
    }