src/MalScraper/Model/Lists/AllGenreModel.php
private function getAllInfo()
    {
        $data = [];
        foreach ($this->_parser->find('.genre-list a') as $each_genre) {
            $genre = [];

            $link = $each_genre->href;
            $link = explode('/', $link);
            $id = $link[3];
            $genre['id'] = $id;

            $name = str_replace('_', ' ', $link[4]);
            $genre['name'] = $name;

            $genre['count'] = $this->getGenreCount($each_genre);

            $data[] = $genre;
        }

        return $data;
    }
private function getAllInfo()
    {
        $data = [];
        foreach ($this->_parser->find('.genre-list a') as $each_genre) {
            $genre = [];

            $link = $each_genre->href;
            $link = explode('/', $link);
            $id = $link[3];
            $genre['id'] = $id;

            $name = str_replace('_', ' ', $link[4]);
            $genre['name'] = $name;

            $genre['count'] = $this->getGenreCount($each_genre);

            $data[] = $genre;
        }

        return $data;
    }
private function getAllInfo ( ) { $ data = [ ] ; foreach ( $ this -> _parser -> find ( '.genre-list a' ) as $ each_genre ) { $ genre = [ ] ; $ link = $ each_genre -> href ; $ link = explode ( '/' , $ link ) ; $ id = $ link [ 3 ] ; $ genre [ 'id' ] = $ id ; $ name = str_replace ( '_' , ' ' , $ link [ 4 ] ) ; $ genre [ 'name' ] = $ name ; $ genre [ 'count' ] = $ this -> getGenreCount ( $ each_genre ) ; $ data [ ] = $ genre ; } return $ data ; }
Get list of all genre.

@return array
Get list of all genre .