Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function api($name) |
||
38 | { |
||
39 | switch($name) { |
||
40 | case 'videos': |
||
41 | return new \Nekland\YoutubeApi\Api\Videos($this); |
||
42 | case 'playlists': |
||
43 | return new \Nekland\YoutubeApi\Api\Playlists($this); |
||
44 | default: |
||
45 | throw new \InvalidArgumentException(sprintf('Undefined api instance called: "%s"', $name)); |
||
46 | } |
||
47 | } |
||
48 | } |
||
49 |