当前位置: 首页>>代码示例>>PHP>>正文


PHP X_Env::routeLink方法代码示例

本文整理汇总了PHP中X_Env::routeLink方法的典型用法代码示例。如果您正苦于以下问题:PHP X_Env::routeLink方法的具体用法?PHP X_Env::routeLink怎么用?PHP X_Env::routeLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在X_Env的用法示例。


在下文中一共展示了X_Env::routeLink方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getPlayable

 /**
  * get a playable resource url
  * from an $url (or a resource id if $isId = true)
  * @param string $url the hoster page or resource ID
  * @param boolean $isId
  * @return string a playable url
  */
 function getPlayable($url, $isId = true)
 {
     if (!$isId) {
         $url = $this->getResourceId($url);
     }
     // TODO find alternative
     return X_Env::routeLink('veoh', 'video', array('id' => $url));
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:15,代码来源:Veoh.php

示例2: bmscriptAction

 public function bmscriptAction()
 {
     $linkAll = X_Env::routeLink('megavideo', 'bookmarklets', array('type' => 'list'));
     $linkSingle = X_Env::routeLink('megavideo', 'bookmarklets', array('type' => 'video'));
     $linkSingleCategoryRequest = X_Env::_('megavideo_bookmarklets_category_selection');
     $paginationRequest = X_Env::_('megavideo_bookmarklets_lotoflinks');
     $allpagesearchRequest = X_Env::_('megavideo_bookmarklets_nolinksinselectioncontinue');
     $statusWindowLink = X_Env::routeLink('megavideo', 'status');
     $this->getResponse()->setHeader('Content-Type', 'text/javascript');
     $this->_helper->layout()->disableLayout();
     $this->view->linkAll = $linkAll;
     $this->view->linkSingle = $linkSingle;
     $this->view->linkSingleCategoryRequest = $linkSingleCategoryRequest;
     $this->view->paginationRequest = $paginationRequest;
     $this->view->allpagesearchRequest = $allpagesearchRequest;
     $this->view->statusWindowLink = $statusWindowLink;
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:17,代码来源:MegavideoController.php

示例3: getUrl

 public function getUrl()
 {
     $this->_fetch();
     if ($this->options->premium && $this->options->username != '' && $this->options->password != '') {
         // i have to check here for quality mode
         $quality = Zend_Controller_Front::getInstance()->getRequest()->getParam('megavideo:quality', 'normal');
         switch ($quality) {
             case self::QUALITY_NOPREMIUM:
                 return $this->_fetched->get('URL');
             case self::QUALITY_NORMAL:
                 return X_Env::routeLink('megavideo', 'premium', array('v' => $this->_fetched->id));
             case self::QUALITY_FULL:
             default:
                 return X_Env::routeLink('megavideo', 'premium', array('v' => $this->_fetched->id, 'q' => $quality));
         }
     } else {
         return $this->_fetched->get('URL');
     }
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:19,代码来源:Megavideo.php

示例4: resolveLocation

 /**
  * @see X_VlcShares_Plugins_ResolverInterface::resolveLocation
  * @param string $location
  * @return string real address of a resource
  */
 function resolveLocation($location = null)
 {
     if ($location == '' || $location == null) {
         return false;
     }
     // if it isn't in the channels array it's an invalid location
     if (!array_search($location, $this->channels)) {
         return null;
     }
     // X_Env::routeLink should be deprecated, but now is the best option
     $linkUrl = X_Env::routeLink('spainradio', 'proxy', array('v' => X_Env::encode($location)));
     $return = $linkUrl;
     return $return;
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:19,代码来源:Spainradio.php

示例5: resolveLocation

 /**
  * @see X_VlcShares_Plugins_ResolverInterface::resolveLocation
  * @param string $location
  * @return string real address of a resource
  */
 function resolveLocation($location = null)
 {
     if ($location == '' || $location == null) {
         return false;
     }
     if (array_key_exists($location, $this->cachedLocation)) {
         return $this->cachedLocation[$location];
     }
     X_Debug::i("Requested location: {$location}");
     @(list($type, $letter, $thread, $href) = explode('/', $location, 4));
     X_Debug::i("Type: {$type}, Letter: {$letter}, Thread: {$thread}, Ep: {$href}");
     if ($href == null || $thread == null || $type == null) {
         $this->cachedLocation[$location] = false;
         return false;
     }
     $return = false;
     if ($type == self::TYPE_SERIES_PERGENRE || $type == self::TYPE_SERIES_PERLETTER) {
         if ($this->helpers()->devices()->isWiimc() || $this->config('proxy.enabled', true)) {
             // X_Env::routeLink should be deprecated, but now is the best option
             $return = X_Env::routeLink('animeftw', 'proxy2', array('id' => X_Env::encode($href)));
         } else {
             // $href is the video id
             try {
                 /* @var $helper X_VlcShares_Plugins_Helper_AnimeFTW */
                 $helper = $this->helpers('animeftw');
                 $episode = $helper->getEpisode($href);
                 if (@$episode['url'] != '') {
                     $return = $episode['url'];
                 }
             } catch (Exception $e) {
             }
         }
     } else {
         // i have to fetch the streaming page :(
         $baseUrl = $this->config('base.url', self::BASE_URL);
         $baseUrl .= "{$type}/{$thread}/{$href}";
         $htmlString = $this->_loadPage($baseUrl, true);
         // <param name=\"src\" value=\"([^\"]*)\" \/>
         if (preg_match('/<param name=\\"src\\" value=\\"([^\\"]*)\\" \\/>/', $htmlString, $match)) {
             // link = match[1]
             $linkUrl = $match[1];
             if (strpos($linkUrl, 'megavideo') !== false) {
                 @(list(, $megavideoID) = explode('/v/', $linkUrl, 2));
                 X_Debug::i("Megavideo ID: {$megavideoID}");
                 try {
                     /* @var $megavideo X_VlcShares_Plugins_Helper_Megavideo */
                     $megavideo = $this->helpers('megavideo');
                     // if server isn't specified, there is no video
                     //$megavideo->setLocation($megavideoID);
                     if ($megavideo->setLocation($megavideoID)->getServer()) {
                         $return = $megavideo->getUrl();
                     }
                 } catch (Exception $e) {
                     X_Debug::e($e->getMessage());
                 }
             } else {
                 // files in videos2.animeftw.tv require a valid referer page to be watched
                 // and animeftw controller does the magic trick
                 if ($this->config('proxy.enabled', true)) {
                     // X_Env::routeLink should be deprecated, but now is the best option
                     $linkUrl = X_Env::routeLink('animeftw', 'proxy', array('v' => X_Env::encode($linkUrl), 'r' => X_Env::encode($baseUrl)));
                 }
                 $return = $linkUrl;
             }
         }
     }
     $this->cachedLocation[$location] = $return;
     return $return;
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:74,代码来源:AnimeFTW.php


注:本文中的X_Env::routeLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。