@param \Jikan\Parser\Common\Recommendation $parser

@return self
@throws \InvalidArgumentException
186910
public static function fromParser(\Jikan\Parser\Common\Recommendation $parser): self
    {
        $instance = new self();

        $instance->url = $parser->getUrl();
        $instance->malId = Parser::idFromUrl($instance->url);
        $instance->imageUrl = $parser->getImageUrl();
        $instance->recommendationUrl = $parser->getRecommendationurl();
        $instance->title = $parser->getTitle();
        $instance->recommendationCount = $parser->getRecommendationCount();

        return $instance;
    }
1282089
public static function parseMagazineManga(Parser\Common\MangaCardParser $parser): MagazineManga
    {
        $instance = new self();
        parent::setProperties($parser, $instance);

        return $instance;
    }
42868
public static function fromParser(Parser\Search\AnimeSearchListItemParser $parser): self
    {
        $instance = new self();

        $instance->url = $parser->getUrl();
        $instance->malId = \Jikan\Helper\Parser::idFromUrl($instance->url);
        $instance->imageUrl = $parser->getImageUrl();
        $instance->title = $parser->getTitle();
        $instance->synopsis = $parser->getSynopsis();
        $instance->type = $parser->getType();
        $instance->episodes = $parser->getEpisodes();
        $instance->score = $parser->getScore();
        $instance->startDate = $parser->getStartDate();
        $instance->endDate = $parser->getEndDate();
        $instance->members = $parser->getMembers();
        $instance->rated = $parser->getRated();
        $instance->airing = $parser->isAiring();

        return $instance;
    }
289182
public static function fromParser(AnimeStaffPositionParser $parser): AnimeStaffPosition
    {
        $instance = new self();
        $instance->position = $parser->getPosition();
        $instance->animeMeta = $parser->getAnimeMeta();

        return $instance;
    }
976053
public function init(Parser $parser, Lexer $lexer) {
        $parser->setStartRule($this->startRule);

        foreach ($this->rules as $rule) {
            $parser->addRule($rule);
        }

        $parser->setLexer($lexer);
        $lexer->setParser($parser);

        return $this;
    }
991093
public function setDivider($divider)
    {
        if (!is_string($divider) && !is_null($divider)) {
            throw new \InvalidArgumentException(
                'Breadcrumbs::setDivider() only accepts strings or NULL, but '
                . (is_object($divider) ? get_class($divider) : gettype($divider))
                . ' given: ' . print_r($divider, true)
            );
        }

        $this->divider = $divider;

        return $this;
    }
1197725
public static function fromParser(VideosParser $parser): self
    {
        $instance = new self();
        $instance->episodes = $parser->getEpisodes();
        $instance->promo = $parser->getPromos();

        return $instance;
    }
195144
public static function fromParser(TopListItemParser $parser): self
    {
        $instance = new self();
        $instance->rank = $parser->getRank();
        $instance->malId = $parser->getMalUrl()->getMalId();
        $instance->title = $parser->getMalUrl()->getTitle();
        $instance->url = $parser->getMalUrl()->getUrl();
        $instance->nameKanji = $parser->getKanjiName();
        $instance->animeography = $parser->getAnimeography();
        $instance->mangaography = $parser->getMangaography();
        $instance->favorites = $parser->getFavorites();
        $instance->imageUrl = $parser->getImage();

        return $instance;
    }
925964
public function setDivider($divider = '/'): Breadcrumbs
    {
        if (!is_string($divider) && !is_null($divider)) {
            throw new InvalidArgumentException('Breadcrumbs::setDivider() only accepts strings or NULL');
        }
        $this->setOption('divider', $divider);

        return $this;
    }
290062
public static function fromParser(MangaRecentlyUpdatedByUsersListParser $parser): self
    {
        $instance = new self();

        $instance->username = $parser->getUsername();
        $instance->url = $parser->getUrl();
        $instance->imageUrl = $parser->getImageUrl();
        $instance->score = $parser->getScore();
        $instance->status = $parser->getStatus();
        $instance->volumesRead = $parser->getVolumesRead();
        $instance->volumesTotal = $parser->getVolumesTotal();
        $instance->chaptersRead = $parser->getChaptersRead();
        $instance->chaptersTotal = $parser->getChaptersTotal();
        $instance->date = $parser->getDate();

        return $instance;
    }
1174812
public static function fromParser(NewsListItemParser $parser): self
    {
        $instance = new self();
        $instance->url = $parser->getUrl();
        $instance->title = $parser->getTitle();
        $instance->date = $parser->getDate();
        $instance->authorName = $parser->getAuthor()->getName();
        $instance->authorUrl = $parser->getAuthor()->getUrl();
        $instance->forumUrl = $parser->getDiscussionLink();
        $instance->imageUrl = $parser->getImage();
        $instance->comments = $parser->getComments();
        $instance->intro = $parser->getIntro();

        return $instance;
    }
906601
public static function fromParser(ScheduleParser $parser): self
    {
        $instance = new self();
        $instance->monday = $parser->getShedule('monday');
        $instance->tuesday = $parser->getShedule('tuesday');
        $instance->wednesday = $parser->getShedule('wednesday');
        $instance->thursday = $parser->getShedule('thursday');
        $instance->friday = $parser->getShedule('friday');
        $instance->saturday = $parser->getShedule('saturday');
        $instance->sunday = $parser->getShedule('sunday');
        $instance->other = $parser->getShedule('other');
        $instance->unknown = $parser->getShedule('unknown');

        return $instance;
    }
1048389
public function parse(Parser $parser)
    {
        $parser->match(Lexer::T_IDENTIFIER);
        $parser->match(Lexer::T_OPEN_PARENTHESIS);

        $this->maskField = $parser->ArithmeticPrimary();
        $this->deleteDeferredPath($parser, $this->maskField);

        $parser->match(Lexer::T_COMMA);
        $this->findValue = $parser->ArithmeticPrimary();

        $parser->match(Lexer::T_CLOSE_PARENTHESIS);
        $this->parserResult = $parser->getParserResult();
    }
972239
public static function fromParser(PromoListItemParser $parser): self
    {
        $instance = new self();
        $instance->title = $parser->getTitle();
        $instance->videoUrl = $parser->getVideoUrl();
        $instance->imageUrl = $parser->getImageUrl();

        return $instance;
    }
827757
public static function fromParser(MangaParser $parser): Manga
    {
        $instance = new self();

        $instance->title = $parser->getMangaTitle();
        $instance->url = $parser->getMangaURL();
        $instance->malId = $parser->getMangaId();
        $instance->imageUrl = $parser->getMangaImageURL();
        $instance->synopsis = $parser->getMangaSynopsis();
        $instance->titleEnglish = $parser->getMangaTitleEnglish();
        $instance->titleSynonyms = $parser->getMangaTitleSynonyms();
        $instance->titleJapanese = $parser->getMangaTitleJapanese();
        $instance->type = $parser->getMangaType();
        $instance->chapters = $parser->getMangaChapters();
        $instance->volumes = $parser->getMangaVolumes();
        $instance->status = $parser->getMangaStatus();
        $instance->publishing = $instance->status === 'Publishing';
        $instance->published = $parser->getPublished();
        $instance->genres = $parser->getMangaGenre();
        $instance->score = $parser->getMangaScore();
        $instance->scoredBy = $parser->getMangaScoredBy();
        $instance->rank = $parser->getMangaRank();
        $instance->popularity = $parser->getMangaPopularity();
        $instance->members = $parser->getMangaMembers();
        $instance->favorites = $parser->getMangaFavorites();
        $instance->related = $parser->getMangaRelated();
        $instance->background = $parser->getMangaBackground();
        $instance->authors = $parser->getMangaAuthors();
        $instance->serializations = $parser->getMangaSerialization();

        return $instance;
    }
92341
public static function fromParser(MagazineParser $parser): self
    {
        $instance = new self();
        $instance->malUrl = $parser->getUrl();
        $instance->manga = $parser->getMagazineManga();

        return $instance;
    }
1256483
public static function parseMangaCard(Parser\Common\MangaCardParser $parser): MangaCard
    {
        $instance = new self();
        self::setProperties($parser, $instance);

        return $instance;
    }