@param int $id

@return \Jikan\Model\Character\Character
@throws Exception\BadResponseException
@throws ParserException
17952
public function Character(int $id): Model\Character\Character
    {
        return $this->myanimelist->getCharacter(
            new Request\Character\CharacterRequest($id)
        );
    }
1326036
public function read($id)
    {
        $rows = $this->tableGateway->select(array(
            $this->options->getIdColumn()   => $id,
            $this->options->getNameColumn() => $this->sessionName,
        ));

        if ($row = $rows->current()) {
            if ($row->{$this->options->getModifiedColumn()} +
                $row->{$this->options->getLifetimeColumn()} > time()) {
                return base64_decode($row->{$this->options->getDataColumn()});
            }
            $this->destroy($id);
        }
        return '';
    }
1061883
public function getById($id)
    {
        $ip = $this->adapter->get(sprintf('%s/floating_ips/%s', $this->endpoint, $id));

        $ip = json_decode($ip);

        return new FloatingIpEntity($ip->floating_ip);
    }
337128
public function getById(int $id): Series
    {
        /* @var TheTVDbAPILanguageFallback $parent */
        $parent  = $this->parent;
        $closure = $this->getClosureById($id);

        return $parent->getGenerator()->create($closure, Series::class, $this->parent->getAcceptedLanguages(), true);
    }
54598
public static function getId($id) {
    $id = str_replace([' ', '_', '[', ']'], ['-', '-', '-', ''], Unicode::strtolower($id));

    // As defined in http://www.w3.org/TR/html4/types.html#type-name, HTML IDs can
    // only contain letters, digits ([0-9]), hyphens ("-"), underscores ("_"),
    // colons (":"), and periods ("."). We strip out any character not in that
    // list. Note that the CSS spec doesn't allow colons or periods in identifiers
    // (http://www.w3.org/TR/CSS21/syndata.html#characters), so we strip those two
    // characters as well.
    $id = preg_replace('/[^A-Za-z0-9\-_]/', '', $id);

    // Removing multiple consecutive hyphens.
    $id = preg_replace('/\-+/', '-', $id);
    return $id;
  }
1245781
public function getFormattedOffsetById($id)
    {
        switch ($id) {
            case self::DF_ISO_8601_BASIC:
            case self::DF_ISO_8601_EXTENDED:
            case self::DF_RFC_2822:
                $offset = $this->getOffset();
                $offset = intval(floor($offset / 60)); // minutes

                if ($offset === 0) {
                    $offset = 'Z';
                } else {
                    $offset_hours = floor($offset / 60);
                    $offset_minutes = abs($offset % 60);

                    $offset = sprintf(
                        '%+03.0d:%02.0d',
                        $offset_hours,
                        $offset_minutes
                    );
                }

                return $offset;
            default:
                throw new Exception("Unknown offset format for id '$id'.");
        }
    }
149265
public static function create($id = null)
    {
        $obj = new self();

        $obj->id = ($id) ? (string) $id : Uuid::uuid4()->toString();

        return $obj;
    }
1253592
static public function getGender($id)
    {
        if (empty($id) || strlen($id) !== 18)
            return null;

        $iSex = (int)substr($id, 16, 1);
        return $iSex % 2 === 0 ? 'F' : 'M';
    }
809512
public function delete(int $id)
    {
        return self::$curl->post(self::DELETE.self::$access_token, json_encode([
                'tag' => [
                    'id' => $id,
                ],
            ]
        ));
    }
1240542
public function Anime(int $id): Model\Anime\Anime
    {
        return $this->myanimelist->getAnime(
            new Request\Anime\AnimeRequest($id)
        );
    }
1215458
public function getCharacter4Id($id, array $jidList = [])
    {
        $query = $this->createQueryBuilder('p')
            ->select('p', 'guild', 'job')
            ->join('p.user', 'user')
            ->leftJoin('p.guild', 'guild', Join::WITH, 'guild.id > 0')
            ->leftJoin('p.job', 'job', Join::WITH, 'job.jobType > 0')
            ->where('p.id = :id')
            ->setParameter('id', $id)
            ->andWhere('p.id > 0')
            ->andWhere('p.deleted = 0');

        if ($jidList) {
            $query->andWhere('user.jid NOT IN (:jidList)')
                ->setParameter('jidList', $jidList);
        }

        $query = $query->getQuery();

        return $query->getOneOrNullResult();
    }
712528
public function raw($id)
    {
        try {
            return parent::raw($id);
        } catch (UnknownIdentifierException $e) {
            throw new ContainerNotFoundException(
                $e->getMessage(),
                $e->getCode(),
                $e
            );
        } catch (\Throwable $e) {
            throw new ContainerException(
                $e->getMessage(),
                $e->getCode(),
                $e
            );
        }
    }
589066
public function AnimeStats(int $id): Model\Anime\AnimeStats
    {
        return $this->myanimelist->getAnimeStats(
            new Request\Anime\AnimeStatsRequest($id)
        );
    }
1333462
protected function prepareUniqueId($id)
    {
        if (preg_match('/\[(.*)\]/', $id, $matches)) {
            $id = $this->getValue($matches[1]);
        }

        if (strtolower($id) === 'null') {
            $id = null;
        }

        if (filter_var($id, FILTER_VALIDATE_INT) !== false) {
            $id = (int) $id;
        }

        return $id;
    }
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 '';
    }
246053
protected function getPdfReader($id)
    {
        if (isset($this->readers[$id])) {
            return $this->readers[$id];
        }

        throw new \InvalidArgumentException(
            \sprintf('No pdf reader with the given id (%s) exists.', $id)
        );
    }
757557
public function encodeId($id = '')
    {
        if (empty($id)) {
            return NULL;
        }
        try {
            $hash = new Hashids($this->hashIds['salt'], $this->hashIds['minHashLength'], $this->hashIds['alphabet']);

            return $hash->encode($id);
        }
        catch (\Exception $e) {
            if (function_exists('log_message')) {
                $message = 'Error Code: ' . $e->getCode() . ' - File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Message: ' . $e->getMessage();
                log_message('error', $message);
            }

            return NULL;
        }
    }