src/Plugin.php
public function handleUrl($url, Event $event, Queue $queue)
    {
        $logger = $this->getLogger();
        $logger->info('handleUrl', array('url' => $url));
        $v = $this->getVideoId($url);
        $logger->info('getVideoId', array('url' => $url, 'v' => $v));
        if (!$v) {
            return;
        }
        $apiUrl = $this->getApiUrl($v);
        $request = $this->getApiRequest($apiUrl, $event, $queue);
        $this->getEventEmitter()->emit('http.request', array($request));
    }
public function handleUrl($url, Event $event, Queue $queue)
    {
        $logger = $this->getLogger();
        $logger->info('handleUrl', array('url' => $url));
        $v = $this->getVideoId($url);
        $logger->info('getVideoId', array('url' => $url, 'v' => $v));
        if (!$v) {
            return;
        }
        $apiUrl = $this->getApiUrl($v);
        $request = $this->getApiRequest($apiUrl, $event, $queue);
        $this->getEventEmitter()->emit('http.request', array($request));
    }
public function handleUrl ( $ url , Event $ event , Queue $ queue ) { $ logger = $ this -> getLogger ( ) ; $ logger -> info ( 'handleUrl' , array ( 'url' => $ url ) ) ; $ v = $ this -> getVideoId ( $ url ) ; $ logger -> info ( 'getVideoId' , array ( 'url' => $ url , 'v' => $ v ) ) ; if ( ! $ v ) { return ; } $ apiUrl = $ this -> getApiUrl ( $ v ) ; $ request = $ this -> getApiRequest ( $ apiUrl , $ event , $ queue ) ; $ this -> getEventEmitter ( ) -> emit ( 'http.request' , array ( $ request ) ) ; }
Sends information about YouTube videos back to channels that receive
URLs to them.

@param string $url
@param \Phergie\Irc\Event\EventInterface $event
@param \Phergie\Irc\Bot\React\EventQueueInterface $queue
Sends information about YouTube videos back to channels that receive URLs to them .