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


PHP X_Debug::e方法代码示例

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


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

示例1: parse

 public function parse($string)
 {
     $parsed = array();
     switch ($this->function) {
         case self::PREG_MATCH:
             if (@preg_match($this->pattern, $string, $parsed, $this->flags) === false) {
                 X_Debug::w("Invalid pattern (" . preg_last_error() . "): {$this->pattern}");
                 $parsed = array();
             }
             break;
         case self::PREG_MATCH_ALL:
             if (@preg_match_all($this->pattern, $string, $parsed, $this->flags) === false) {
                 X_Debug::w("Invalid pattern (" . preg_last_error() . "): {$this->pattern}");
                 $parsed = array();
             }
             break;
         case self::PREG_SPLIT:
             $parsed = @preg_split($this->pattern, $string, null, $this->flags);
             if ($parsed === false) {
                 X_Debug::w("Invalid pattern (" . preg_last_error() . "): {$this->pattern}");
                 $parsed = array();
             }
             break;
         default:
             X_Debug::e("Invalid function code provided: {$this->function}");
     }
     return $parsed;
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:28,代码来源:Preg.php

示例2: wakeup

 public function wakeup(X_Threads_Thread_Info $thread)
 {
     try {
         $this->resume($thread);
     } catch (Exception $e) {
         X_Debug::e("Wake up failed");
     }
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:8,代码来源:Manager.php

示例3: registerVlcLocation

 static function registerVlcLocation(X_VlcShares_Plugins_ResolverInterface $plugin, X_Vlc $vlc, $location)
 {
     $location = $plugin->resolveLocation($location);
     if ($location !== null) {
         $vlc->registerArg('source', "\"{$location}\"");
     } else {
         X_Debug::e("No source o_O");
     }
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:9,代码来源:Utils.php

示例4: processProperties

 protected function processProperties($properties = array())
 {
     if (!is_array($properties)) {
         X_Debug::e("Properties is not an array");
         return;
     }
     foreach ($properties as $key => $value) {
         $properties_ignored = true;
         // prot-type is valid
         if (isset(self::$validProperties[$key])) {
             // check value
             $validValues = self::$validProperties[$key];
             @(list($typeValidValues, $validValues) = @explode(':', $validValues, 2));
             // typeValidValues = boolean / regex / set / ...
             switch ($typeValidValues) {
                 case 'boolean':
                     $checkValues = array('true', 'false', '0', '1');
                     if (array_search($value, $checkValues)) {
                         // cast to type
                         $value = (bool) $value;
                         $properties_ignored = false;
                     } else {
                         $properties_ignored = "invalid property value {{$value}}, not boolean";
                     }
                     break;
                 case 'set':
                     $checkValues = explode('|', $validValues);
                     if (array_search($value, $checkValues)) {
                         $properties_ignored = false;
                     } else {
                         $properties_ignored = "invalid property value {{$value}}, not in valid set";
                     }
                     break;
                 case 'regex':
                     if (preg_match($validValues, $value)) {
                         $properties_ignored = false;
                     } else {
                         $properties_ignored = "invalid property value {{$value}}, format not valid";
                     }
                     break;
             }
         } else {
             $properties_ignored = "invalid property";
         }
         if ($properties_ignored !== false) {
             X_Debug::w("Property {{$key}} of acl-resource {{$this->getKey()}} ignored: " . $properties_ignored !== true ? $properties_ignored : 'unknown reason');
         } else {
             X_Debug::i("Valid property for acl-resource {{$this->getKey()}}: {$key} => {{$value}}");
             $this->properties[$key] = $value;
         }
     }
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:52,代码来源:AclResource.php

示例5: __construct

 public function __construct(X_Vlc $vlcInstance = null)
 {
     if (is_null($vlcInstance)) {
         $vlcInstance = X_Vlc::getLastInstance();
         // OMG OMG no
     }
     if (is_null($vlcInstance)) {
         // check again
         X_Debug::e("Streamer engine VLC without a vlc instance available");
         throw new Exception("No X_Vlc instance available");
     }
     $this->vlc = $vlcInstance;
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:13,代码来源:Vlc.php

示例6: getResourceId

 /**
  * get the resource ID for the hoster
  * from an $url
  * @param string $url the hoster page
  * @return string the resource id
  */
 function getResourceId($url)
 {
     $matches = array();
     if (preg_match(self::PATTERN, $url, $matches)) {
         if ($matches['ID'] != '') {
             return $matches['ID'];
         }
         X_Debug::e("No id found in {{$url}}", self::E_ID_NOTFOUND);
         throw new Exception("No id found in {{$url}}");
     } else {
         X_Debug::e("Regex failed");
         throw new Exception("Regex failed", self::E_URL_INVALID);
     }
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:20,代码来源:GorillaVid.php

示例7: parse

 public function parse($string)
 {
     $parsed = array();
     if ($this->namespace) {
         $parsed = simplexml_load_string($string, "SimpleXMLElement", 0, $this->namespace);
     } else {
         $parsed = simplexml_load_string($string);
     }
     if ($parsed === false) {
         X_Debug::e("simplexml_load_string return error: invalid string");
         $parsed = array();
     }
     return $parsed;
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:14,代码来源:SimpleXml.php

示例8: getIndexNews

 /**
  * Retrieve news from plugins
  * @param Zend_Controller_Action $this
  * @return X_Page_ItemList_News
  */
 public function getIndexNews(Zend_Controller_Action $controller)
 {
     try {
         $view = $controller->getHelper('viewRenderer');
         $view->view->headScript()->appendFile('http://www.google.com/jsapi');
         $view->view->headScript()->appendFile($view->view->baseUrl("/js/widgetdevnews/script.js"));
         $view->view->headLink()->appendStylesheet($view->view->baseUrl('/css/widgetdevnews/style.css'));
         $text = (include dirname(__FILE__) . '/WidgetDevNews.commits.phtml');
         $item = new X_Page_Item_News($this->getId(), '');
         $item->setTab(X_Env::_('p_widgetdevnews_commits_tab'))->setContent($text);
         return new X_Page_ItemList_News(array($item));
     } catch (Exception $e) {
         X_Debug::e('No view O_o');
     }
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:20,代码来源:WidgetDevNews.php

示例9: parse

 /**
  * (non-PHPdoc)
  * @see X_PageParser_Parser::parse()
  */
 public function parse($string)
 {
     $matches = array();
     if (!preg_match(self::PATTERN_MAIN, $string, $matches)) {
         X_Debug::e('Main pattern failed');
         return array();
     }
     $string = $matches['main'];
     $string = str_replace(array('\\n', '\\u003c', '\\u003e'), array('', '<', '>'), $string);
     $string = stripslashes($string);
     //X_Debug::i("Decoded string: {$string}");
     $matches = array();
     if (!preg_match_all(self::PATTERN_ITEMS, $string, $matches, PREG_SET_ORDER)) {
         X_Debug::e('Items pattern failed: {' . preg_last_error() . '}');
         return array();
     }
     return $matches;
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:22,代码来源:HuluFree.php

示例10: dispatchRequest

 protected function dispatchRequest(Zend_Controller_Request_Http $request, X_Page_ItemList_PItem $items, Zend_Controller_Action $controller)
 {
     /* @var $view Zend_Controller_Action_Helper_ViewRenderer */
     $view = $controller->getHelper('viewRenderer');
     /* @var $layout Zend_Layout_Controller_Action_Helper_Layout */
     $layout = $controller->getHelper('layout');
     try {
         $view->setNoRender(true);
         $layout->disableLayout();
     } catch (Exception $e) {
         X_Debug::e("Layout or View not enabled: " . $e->getMessage());
     }
     $result = array();
     $actionName = $request->getActionName();
     $controllerName = $request->getControllerName();
     $result['controller'] = $controllerName;
     $result['action'] = $actionName;
     $result['success'] = true;
     $result['items'] = array();
     /* @var $urlHelper Zend_Controller_Action_Helper_Url */
     $urlHelper = $controller->getHelper('url');
     $skipMethod = array('getCustom', 'getLinkParam', 'getLinkAction', 'getLinkController');
     foreach ($items->getItems() as $itemId => $item) {
         /* @var $item X_Page_Item_PItem */
         $aItem = array();
         $methods = get_class_methods(get_class($item));
         foreach ($methods as $method) {
             if (array_search($method, $skipMethod) !== false) {
                 continue;
             }
             if ($method == "getIcon") {
                 $aItem['icon'] = $request->getBaseUrl() . $item->getIcon();
             } elseif (X_Env::startWith($method, 'get')) {
                 $aItem[lcfirst(substr($method, 3))] = $item->{$method}();
             } elseif (X_Env::startWith($method, 'is')) {
                 $aItem[lcfirst(substr($method, 2))] = $item->{$method}();
             }
         }
         $result['items'][] = $aItem;
     }
     /* @var $jsonHelper Zend_Controller_Action_Helper_Json */
     $jsonHelper = $controller->getHelper('Json');
     $jsonHelper->direct($result, true, false);
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:44,代码来源:WebkitRenderer.php

示例11: setConfigs

 /**
  * Store plugin config and set priorities if in configs
  * @param array|Zend_Config $configs
  */
 public function setConfigs($configs)
 {
     if ($configs instanceof Zend_Config) {
         $this->configs = $configs;
     } elseif (is_array($configs)) {
         $this->configs = new Zend_Config($configs);
     } else {
         X_Debug::e('Unknown plugin configs: ' + var_export($configs, true));
         throw new Exception('Unknown configs');
     }
     if ($this->configs->priorities) {
         foreach ($this->configs->priorities->toArray() as $triggerName => $priority) {
             $this->setPriority($triggerName, $priority);
         }
     }
     if ($this->configs->id) {
         $this->id = $this->configs->id;
     }
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:23,代码来源:Abstract.php

示例12: resolveLocation

 /**
  * @see X_VlcShares_Plugins_ResolverInterface::getLocation()
  */
 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($hoster, $id) = explode(':', $location, 2);
     try {
         $return = $this->helpers()->hoster()->getHoster($hoster)->getPlayable($id, true);
     } catch (Exception $e) {
         X_Debug::e("Own3dLive hoster error: {$e->getMessage()}");
         $return = false;
     }
     $this->cachedLocation[$location] = $return;
     return $return;
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:22,代码来源:Own3d.php

示例13: videoAction

 public function videoAction()
 {
     $id = $this->getRequest()->getParam("id", false);
     if (!$id) {
         throw new Exception(X_Env::_("p_veoh_invalid_id"));
     }
     // this algorithm is taken from jdownload veoh hoster plugin
     $http1 = new Zend_Http_Client();
     $http1->setCookieJar(true);
     $http1->setUri("http://www.veoh.com/watch/{$id}");
     $response1 = $http1->request()->getBody();
     $fbsettingPattern = '/FB\\.init\\(\\"(?P<fbsetting>[^\\"]+)\\"/';
     $fbsetting = array();
     if (!preg_match($fbsettingPattern, $response1, $fbsetting)) {
         X_Debug::e("Can't get FBSetting. Regex failed");
         throw new Exception("Can't get FBSetting");
     }
     $fbsetting = $fbsetting['fbsetting'];
     $http2 = new Zend_Http_Client();
     $http2->setUri("http://www.veoh.com/static/swf/webplayer/VWPBeacon.swf?port=50246&version=1.2.2.1112");
     $response2 = $http2->request();
     $http1->setUri("http://www.veoh.com/rest/v2/execute.xml?apiKey=" . base64_decode(X_VlcShares_Plugins_Veoh::APIKEY) . "&method=veoh.video.findByPermalink&permalink=" . $id . "&");
     $response1 = $http1->request()->getBody();
     $fHashPath = array();
     if (!preg_match('/fullHashPath\\=\\"(?P<fHashPath>[^\\"]+)\\"/', $response1, $fHashPath)) {
         X_Debug::e("Can't get fHashPath. Regex failed");
         throw new Exception("Can't get fHashPath");
     }
     $fHashPath = $fHashPath['fHashPath'];
     $fHashToken = array();
     if (!preg_match('/fullHashPathToken\\=\\"(?P<fHashToken>[^\\"]+)\\"/', $response1, $fHashToken)) {
         X_Debug::e("Can't get fHashToken. Regex failed");
         throw new Exception("Can't get fHashToken");
     }
     $fHashToken = $fHashToken['fHashToken'];
     // TODO check if correct
     $fHashToken = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, pack('H*', base64_decode(X_VlcShares_Plugins_Veoh::SKEY)), base64_decode($fHashToken), MCRYPT_MODE_CBC, pack('H*', base64_decode(X_VlcShares_Plugins_Veoh::IV)));
     //$fHashToken = trim($fHashToken);
     if (!preg_match('/(?P<fHashToken>[a-z0-9A-z]+)/', $fHashToken, $fHashToken)) {
         throw new Exception("Decryption failed");
     }
     $fHashToken = $fHashToken['fHashToken'];
     if ($fHashPath == null || $fHashToken == null) {
         throw new Exception("Hoster failure");
     }
     X_Debug::i("HashPath: {$fHashPath}, HashToken: {$fHashToken}");
     $http1->getCookieJar()->addCookie(new Zend_Http_Cookie("fbsetting_{$fbsetting}", "%7B%22connectState%22%3A2%2C%22oneLineStorySetting%22%3A3%2C%22shortStorySetting%22%3A3%2C%22inFacebook%22%3Afalse%7D", "http://www.veoh.com"));
     $http1->getCookieJar()->addCookie(new Zend_Http_Cookie("base_domain_{$fbsetting}", "veoh.com", "http://www.veoh.com"));
     $cookies = $http1->getCookieJar()->getAllCookies(Zend_Http_CookieJar::COOKIE_STRING_CONCAT);
     $opts = array('http' => array('header' => array("Referer: http://www.veoh.com/static/swf/qlipso/production/MediaPlayer.swf?version=2.0.0.011311.5", "x-flash-version: 10,1,53,64", "Cookie: {$cookies}"), 'content' => $fHashPath . $fHashToken));
     $context = stream_context_create($opts);
     X_Debug::i("Video url: {$fHashPath}{$fHashToken}");
     // this action is so special.... no layout or viewRenderer
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->layout->disableLayout();
     // if user abort request (vlc/wii stop playing), this process ends
     ignore_user_abort(false);
     // close and clean the output buffer, everything will be read and send to device
     ob_end_clean();
     header("Content-Type: video/flv");
     @readfile("{$fHashPath}{$fHashToken}", false, $context);
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:62,代码来源:VeohController.php

示例14: getIndexMessages

 /**
  * Retrieve statistic from plugins
  * @param Zend_Controller_Action $this
  * @return array The format of the array should be:
  * 		array(
  * 			array(
  * 				'title' => ITEM TITLE,
  * 				'label' => ITEM LABEL,
  * 				'stats' => array(INFO, INFO, INFO),
  * 				'provider' => array('controller', 'index', array()) // if provider is setted, stats key is ignored 
  * 			), ...
  * 		)
  */
 public function getIndexMessages(Zend_Controller_Action $controller)
 {
     X_Debug::i('Plugin triggered');
     $type = 'warning';
     $showError = true;
     try {
         $backupDir = new DirectoryIterator(APPLICATION_PATH . "/../data/backupper/");
         foreach ($backupDir as $entry) {
             if ($entry->isFile() && pathinfo($entry->getFilename(), PATHINFO_EXTENSION) == 'xml' && X_Env::startWith($entry->getFilename(), 'backup_')) {
                 $showError = false;
                 break;
             }
         }
     } catch (Exception $e) {
         X_Debug::e("Error while parsing backupper data directory: {$e->getMessage()}");
     }
     $showError = $showError && $this->config('alert.enabled', true);
     if ($showError) {
         $urlHelper = $controller->getHelper('url');
         /* @var $urlHelper Zend_Controller_Action_Helper_Url */
         $removeAlertLink = $urlHelper->url(array('controller' => 'backupper', 'action' => 'alert', 'status' => 'off'));
         $mess = new X_Page_Item_Message($this->getId(), X_Env::_('p_backupper_warningmessage_nobackup') . " <a href=\"{$removeAlertLink}\">" . X_Env::_('p_backupper_warningmessage_nobackupremove') . '</a>');
         $mess->setType($type);
         return new X_Page_ItemList_Message(array($mess));
     }
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:39,代码来源:Backupper.php

示例15: registerVlcArgs

 /**
  * This hook can be used to add normal priority args in vlc stack
  * 
  * @param X_Vlc $vlc vlc wrapper object
  * @param string $provider id of the plugin that should handle request
  * @param string $location to stream
  * @param Zend_Controller_Action $controller the controller who handle the request
  */
 public function registerVlcArgs(X_Vlc $vlc, $provider, $location, Zend_Controller_Action $controller)
 {
     X_Debug::i('Plugin triggered');
     $profileId = $controller->getRequest()->getParam($this->getId(), false);
     if ($profileId !== false) {
         $profile = new Application_Model_Profile();
         Application_Model_ProfilesMapper::i()->find($profileId, $profile);
     } else {
         // if no params is provided, i will try to
         // get the best profile for this condition
         $profile = $this->getBest($location, $this->helpers()->devices()->getDeviceType(), $provider);
     }
     if ($profile->getArg() !== null) {
         $vlc->registerArg('profile', $profile->getArg());
         if ($this->config('store.session', true)) {
             // store the link in session for future use
             try {
                 /* @var $cache X_VlcShares_Plugins_Helper_Cache */
                 $cache = $this->helpers()->helper('cache');
                 $cache->storeItem('profile::lastvlclink', $profile->getLink(), 240);
             } catch (Exception $e) {
                 // nothing to store or no place to store to
             }
         }
     } else {
         X_Debug::e("No profile arg for vlc");
     }
 }
开发者ID:google-code-backups,项目名称:vlc-shares,代码行数:36,代码来源:Profiles.php


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