Returns the basic string used to identify a page type provided with an id

This string can be used to instantiate or identify the page type class.
If the page type id is unknown then 'unknown' is returned

@param int $id
@return string
349048
public function get_page_type_idstring($id) {
        foreach ($this->types as $pagetype) {
            if ((int)$pagetype->typeid === (int)$id) {
                return $pagetype->idstring;
            }
        }
        return 'unknown';
    }
1133444
public static function getFormatById($id)
    {
        // Note: The format() method does not localize results, so these
        // format codes are _not_ wrapped in gettext calls.

        switch ($id) {
            case self::DF_MDY:
                return 'm/d/y';
            case self::DF_MDY_SHORT:
                return 'mdy';
            case self::DF_DATE:
                return 'F j, Y';
            case self::DF_DATE_LONG:
                return 'l, F j, Y';
            case self::DF_DATE_TIME:
                return 'F j, Y g:i a';
            case self::DF_DATE_TIME_LONG:
                return 'l, F j, Y g:i a';
            case self::DF_TIME:
                return 'g:i a';
            case self::DF_DATE_SHORT:
                return 'M j, Y';
            case self::DF_DATE_SHORT_NOYEAR:
                return 'M j';
            case self::DF_DATE_TIME_SHORT:
                return 'M j, Y g:i a';
            case self::DF_DATE_TIME_SHORT_NOYEAR:
                return 'M j, g:i a';
            case self::DF_MY:
                return 'F Y';
            case self::DF_CC_MY:
                return 'm / Y';
            case self::DF_Y:
                return 'Y';
            case self::DF_ISO_8601_BASIC:
                return 'Ymd\THis';
            case self::DF_ISO_8601_EXTENDED:
                return 'Y-m-d\TH:i:s';
            case self::DF_RFC_2822:
                return 'r';
            default:
                throw new Exception("Unknown date format id '$id'.");
        }
    }
137962
public function getOrFail($id)
    {

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

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

        throw new ResourceNotFoundException("$typeName #$id not found.");
    }
608013
public function getContentType(string $id): ?ContentType
    {
        foreach ($this->clientsConfig as $clientConfig) {
            /** @var \Contentful\Delivery\Client $client */
            $client = $clientConfig['service'];

            foreach ($client->getContentTypes()->getItems() as $contentType) {
                /** @var \Contentful\Delivery\Resource\ContentType $contentType */
                if ($contentType->getId() === $id) {
                    return $contentType;
                }
            }
        }

        return null;
    }
915027
public static function getById($id)
    {
        $result = null;
        $info = CldrData::getLanguageInfo($id);
        if (isset($info)) {
            $result = new Language($info);
        }

        return $result;
    }
943795
public function getGenre($id)
    {
        foreach ($this->data as $genre) {
            if ($id === $genre->getId()) {
                return $genre;
            }
        }

        return null;
    }
1074804
public static function read($id)
    {
        return (string)Symphony::Database()->fetchVar(
            'session_data',
            0,
            sprintf(
                "SELECT `session_data`
                FROM `tbl_sessions`
                WHERE `session` = '%s'
                LIMIT 1",
                Symphony::Database()->cleanValue($id)
            )
        );
    }
676511
public static function fetchPageTypes($page_id = null)
    {
        return Symphony::Database()->fetchCol('type', sprintf(
            "SELECT
                type
            FROM
                `tbl_pages_types` AS pt
            WHERE
                %s
            GROUP BY
                pt.type
            ORDER BY
                pt.type ASC",
            (is_null($page_id) ? '1' : sprintf('pt.page_id = %d', $page_id))
        ));
    }
1018356
private function getDocumentPath(string $id): string
    {
        return $this->getDirectoryPath($id).'.'.$this->format->getExtension();
    }
629309
public function read($id)
    {
        $session = $this->entityManager->find($this->entityManager, $id);
        if (null !== $session) {
            if ($this->_getExpirationTime($session) > time()) {
                return $session->{$this->dataColumn};
            } else {
                $this->destroy($id);
            }
        }

        return '';
    }
187800
protected function getType($id)
    {
        $type = $this->attributeTypeRepository->find($id);
        if (!$type) {
            throw new EntityNotFoundException(AttributeType::class, $id);
        }

        return $type;
    }
1273171
public function getParameterByID($id)
    {
        $param = current(array_filter($this->params, function (Param $param) use ($id) {
            return ($param->id === $id);
        }));

        return ($param) ? $param : null;
    }
1218140
public static function classAttributeIdentifierByID( $id )
    {
        $identifierHash = array_flip( self::classAttributeIdentifiersHash() );

        if ( isset( $identifierHash[$id] ) )
        {
            $classAndClassAttributeIdentifier = explode( '/', $identifierHash[$id] );
            return $classAndClassAttributeIdentifier[1];
        }
        else
            return false;
    }
817675
protected function getEncoding($id)
    {
        $header = $this->imapFetchStructure($id);
        $params = $header->parameters ?: [];
            foreach ($params as $k => $v) {
                if (stristr($v->attribute, 'charset')) {
                    return $v->value;
                }
            }
        return 'utf-8';
    }
1248832
public function params($id)
	{
		$params = '';

		if ($this->app->has('db'))
		{
			$db = $this->app['db'];

			$query = $db->getQuery()
				->select('params')
				->from('#__modules')
				->whereEquals('published', 1);

			// Select module params based on name or ID
			if (is_numeric($id))
			{
				$query->whereEquals('id', (int) $id);
			}
			else
			{
				$query->whereEquals('module', $id);
			}

			$db->setQuery($query->toString());
			$params = $db->loadResult();
		}

		//return params
		return new Registry($params);
	}
1060647
public static function sessionId($id = null)
    {
        if (PHP_SAPI != 'cli') {
            return $id ? session_id($id) : session_id();
        }
        if (static::sessionStarted() && HttpCache::$instance->sessionFile) {
            return str_replace('ses_', '', basename(HttpCache::$instance->sessionFile));
        }
        return '';
    }
284631
public function MangaMoreInfo(int $id): ?string
    {
        return $this->myanimelist->getMangaMoreInfo(
            new Request\Manga\MangaMoreInfoRequest($id)
        );
    }