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


PHP hd_print函数代码示例

本文整理汇总了PHP中hd_print函数的典型用法代码示例。如果您正苦于以下问题:PHP hd_print函数的具体用法?PHP hd_print怎么用?PHP hd_print使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: handle_user_input

 public function handle_user_input(&$user_input, &$plugin_cookies)
 {
     hd_print('Vod favorites: handle_user_input:');
     foreach ($user_input as $key => $value) {
         hd_print("  {$key} => {$value}");
     }
     if ($user_input->control_id == 'popup_menu') {
         if (!isset($user_input->selected_media_url)) {
             return null;
         }
         $media_url = MediaURL::decode($user_input->selected_media_url);
         $movie_id = $media_url->movie_id;
         $is_favorite = $this->vod->is_favorite_movie_id($movie_id);
         $add_favorite_action = UserInputHandlerRegistry::create_action($this, 'add_favorite');
         $caption = 'Add to My Movies';
         $menu_items[] = array(GuiMenuItemDef::caption => $caption, GuiMenuItemDef::action => $add_favorite_action);
         return ActionFactory::show_popup_menu($menu_items);
     } else {
         if ($user_input->control_id == 'add_favorite') {
             if (!isset($user_input->selected_media_url)) {
                 return null;
             }
             $media_url = MediaURL::decode($user_input->selected_media_url);
             $movie_id = $media_url->movie_id;
             $is_favorite = $this->vod->is_favorite_movie_id($movie_id);
             if ($is_favorite) {
                 return ActionFactory::show_title_dialog('Movie already resides in My Movies');
             } else {
                 $this->vod->add_favorite_movie($movie_id, $plugin_cookies);
                 return ActionFactory::show_title_dialog('Movie has been added to My Movies');
             }
         }
     }
     return null;
 }
开发者ID:benki11,项目名称:kartina_dune_hd_plugin,代码行数:35,代码来源:vod_list_screen.php

示例2: handle_user_input

 public function handle_user_input(&$user_input, &$plugin_cookies)
 {
     hd_print('Vod search: handle_user_input:');
     foreach ($user_input as $key => $value) {
         hd_print("  {$key} => {$value}");
     }
     if ($user_input->action_type === 'apply') {
         $control_id = $user_input->control_id;
         if ($control_id === 'pattern') {
             $pattern = $user_input->pattern;
             $plugin_cookies->vod_search_pattern = $pattern;
             hd_print("Vod search: applying pattern '{$pattern}'");
             $defs = $this->do_get_control_defs($plugin_cookies);
             return ActionFactory::reset_controls($defs, ActionFactory::open_folder($this->vod->get_search_media_url_str($pattern), $pattern));
         }
     } else {
         if ($user_input->action_type === 'confirm') {
             $control_id = $user_input->control_id;
             $new_value = $user_input->{$control_id};
             if ($control_id === 'pattern') {
                 $pattern = $user_input->pattern;
                 if (preg_match('/^\\s*$/', $pattern)) {
                     return ActionFactory::show_error(false, 'Pattern should not be empty');
                 }
             }
         }
     }
     return null;
 }
开发者ID:benki11,项目名称:kartina_dune_hd_plugin,代码行数:29,代码来源:vod_search_screen.php

示例3: set_default

 public function set_default($key, $value)
 {
     if (!isset($this->data[$key])) {
         hd_print("Warning: no value for key '{$key}'. Using default: '{$value}'");
         $this->data[$key] = $value;
     }
 }
开发者ID:basstreumer,项目名称:emplexer,代码行数:7,代码来源:conf.php

示例4: handle_user_input

 public function handle_user_input(&$user_input, &$plugin_cookies)
 {
     hd_print('Entry handler: handle_user_input:');
     foreach ($user_input as $key => $value) {
         hd_print("  {$key} => {$value}");
     }
     if (!isset($user_input->entry_id)) {
         return null;
     }
     $add_params = array('entry_id' => $user_input->entry_id);
     if ($user_input->entry_id === 'setup' || $user_input->entry_id === 'tv') {
         $res = $this->session->apply_subscription($plugin_cookies, $user_input);
         if ($res !== false) {
             if (!isset($res['action'])) {
                 return ActionFactory::close_dialog_and_run(ActionFactory::open_folder());
             }
             return $res['need_close_dialog'] ? ActionFactory::close_dialog_and_run($res['action']) : $res['action'];
         } else {
             if ($this->session->is_logged_in()) {
                 return ActionFactory::open_folder();
             }
             if (!isset($plugin_cookies->user_name) || $plugin_cookies->user_name === '') {
                 return $this->session->do_get_edit_subscription_action($plugin_cookies, $this, $add_params);
             }
             return ActionFactory::open_folder();
         }
     }
     return null;
 }
开发者ID:benki11,项目名称:kartina_dune_hd_plugin,代码行数:29,代码来源:ktv_entry_handler.php

示例5: hd_error_handler

function hd_error_handler($error_type, $message, $file, $line)
{
    static $map = array(E_ERROR => 'E_ERROR', E_WARNING => 'E_WARNING', E_PARSE => 'E_PARSE', E_NOTICE => 'E_NOTICE', E_CORE_ERROR => 'E_CORE_ERROR', E_CORE_WARNING => 'E_CORE_WARNING', E_COMPILE_ERROR => 'E_COMPILE_ERROR', E_COMPILE_WARNING => 'E_COMPILE_WARNING', E_USER_ERROR => 'E_USER_ERROR', E_USER_WARNING => 'E_USER_WARNING', E_USER_NOTICE => 'E_USER_NOTICE', E_STRICT => 'E_STRICT', E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', E_DEPRECATED => 'E_DEPRECATED', E_USER_DEPRECATED => 'E_USER_DEPRECATED');
    if (isset($map[$error_type])) {
        hd_print("[{$file}:{$line}] [{$map[$error_type]}] {$message}");
    }
}
开发者ID:basstreumer,项目名称:emplexer,代码行数:7,代码来源:bootstrap.php

示例6: call_plugin_impl

 protected function call_plugin_impl($call_ctx)
 {
     static $plugin;
     if (is_null($plugin)) {
         try {
             hd_print('Instantiating plugin...');
             $plugin = $this->create_plugin();
             hd_print('Plugin instance created.');
         } catch (Exception $e) {
             hd_print('Error: can not instantiate plugin (' . $e->getMessage() . ')');
             return array(PluginOutputData::has_data => false, PluginOutputData::plugin_cookies => $call_ctx->plugin_cookies, PluginOutputData::is_error => true, PluginOutputData::error_action => ActionFactory::show_error(true, T::t('title_application_error'), array(T::t('msg_plugin_init_failed'))));
         }
     }
     $out_data = null;
     try {
         $out_data = $this->invoke_operation($plugin, $call_ctx);
     } catch (DuneException $e) {
         hd_print("Error: DuneException caught: " . $e->getMessage());
         return array(PluginOutputData::has_data => false, PluginOutputData::plugin_cookies => $call_ctx->plugin_cookies, PluginOutputData::is_error => true, PluginOutputData::error_action => $e->get_error_action());
     } catch (Exception $e) {
         hd_print("Error: Exception caught: " . $e->getMessage());
         return array(PluginOutputData::has_data => false, PluginOutputData::plugin_cookies => $call_ctx->plugin_cookies, PluginOutputData::is_error => true, PluginOutputData::error_action => ActionFactory::show_error(true, T::t('title_application_error'), array(T::t('msg_unhandled_plugin_error'))));
     }
     $plugin_output_data = array(PluginOutputData::has_data => !is_null($out_data), PluginOutputData::plugin_cookies => $call_ctx->plugin_cookies, PluginOutputData::is_error => false, PluginOutputData::error_action => null);
     if ($plugin_output_data[PluginOutputData::has_data]) {
         $plugin_output_data[PluginOutputData::data_type] = $this->get_out_type_code($call_ctx->op_type_code);
         $plugin_output_data[PluginOutputData::data] = $out_data;
     }
     return $plugin_output_data;
 }
开发者ID:fluxuator,项目名称:dune_plugin_phpinfo,代码行数:30,代码来源:default_dune_plugin_fw.php

示例7: call_plugin_impl

 protected function call_plugin_impl($call_ctx)
 {
     static $plugin;
     if (is_null($plugin)) {
         try {
             hd_print('Instantiating plugin...');
             $plugin = $this->create_plugin();
             hd_print('Plugin instance created.');
         } catch (Exception $e) {
             hd_print('Error: can not instantiate plugin (' . $e->getMessage() . ')');
             return array(PluginOutputData::has_data => false, PluginOutputData::plugin_cookies => $call_ctx->plugin_cookies, PluginOutputData::is_error => true, PluginOutputData::error_action => ActionFactory::show_error(true, 'System error', array('Can not create PHP plugin instance.', 'Call the PHP plugin vendor.')));
         }
     }
     // assert($plugin);
     $out_data = null;
     try {
         $out_data = $this->invoke_operation($plugin, $call_ctx);
     } catch (DuneException $e) {
         hd_print("Error: DuneException caught: " . $e->getMessage());
         return array(PluginOutputData::has_data => false, PluginOutputData::plugin_cookies => $call_ctx->plugin_cookies, PluginOutputData::is_error => true, PluginOutputData::error_action => $e->get_error_action());
     } catch (Exception $e) {
         hd_print("Error: Exception caught: " . $e->getMessage());
         return array(PluginOutputData::has_data => false, PluginOutputData::plugin_cookies => $call_ctx->plugin_cookies, PluginOutputData::is_error => true, PluginOutputData::error_action => ActionFactory::show_error(true, 'System error', array('Unhandled PHP plugin error.', 'Call the PHP plugin vendor.')));
     }
     // Note: change_tv_favorites() may return NULL even if it's completed
     // successfully.
     $plugin_output_data = array(PluginOutputData::has_data => !is_null($out_data), PluginOutputData::plugin_cookies => $call_ctx->plugin_cookies, PluginOutputData::is_error => false, PluginOutputData::error_action => null);
     if ($plugin_output_data[PluginOutputData::has_data]) {
         $plugin_output_data[PluginOutputData::data_type] = $this->get_out_type_code($call_ctx->op_type_code);
         $plugin_output_data[PluginOutputData::data] = $out_data;
     }
     return $plugin_output_data;
 }
开发者ID:denpamusic,项目名称:ztv_dune_hd,代码行数:33,代码来源:default_dune_plugin_fw.php

示例8: get_screen_by_id

 protected function get_screen_by_id($screen_id)
 {
     if (isset($this->screens[$screen_id])) {
         return $this->screens[$screen_id];
     }
     hd_print("Error: no screen with id '{$screen_id}' found.");
     throw new Exception('Screen not found');
 }
开发者ID:denpamusic,项目名称:ztv_dune_hd,代码行数:8,代码来源:default_dune_plugin.php

示例9: handle_user_input

 public function handle_user_input(&$user_input, &$plugin_cookies)
 {
     // hd_print(__METHOD__);
     hd_print(print_r($user_input, true));
     $media_url = MediaURL::decode($user_input->selected_media_url);
     if ($user_input->control_id == 'pop_up') {
     }
 }
开发者ID:basstreumer,项目名称:emplexer,代码行数:8,代码来源:emplexer_season_list.php

示例10: __set

 public function __set($name, $value)
 {
     $this->{$name} = $value;
     hd_print("{$name}={$name} value=" . is_array($value) ? print_r($value, true) : $value);
     if ($name == "folder_views") {
         hd_print("folder_view");
         $this->set_default_folder_view_index_attr_name();
     }
 }
开发者ID:basstreumer,项目名称:emplexer,代码行数:9,代码来源:abstract_regular_screen.php

示例11: get_mac_addr

 public static function get_mac_addr()
 {
     static $mac_addr = null;
     if (is_null($mac_addr)) {
         $mac_addr = str_replace(':', '-', HD::get_mac_addr());
         hd_print("API: macaddr '{$mac_addr}'");
     }
     return $mac_addr;
 }
开发者ID:denpamusic,项目名称:ztv_dune_hd,代码行数:9,代码来源:jsonrpc.php

示例12: getDetailedInfo

 public function getDetailedInfo(SimpleXMLElement &$node)
 {
     hd_print(__METHOD__);
     $info = (string) $node->attributes()->title;
     // 'Serie:' . (string)$c->attributes()->grandparentTitle . ' || ' .
     // 'Episode Name :' . (string)$c->attributes()->title. ' || ' .
     // 'EP:'  . 'S'.(string)$c->attributes()->parentIndex . 'E'. (string)$c->attributes()->index . '||' .
     // 'summary:'. str_replace('"', '' , (string)$c->attributes()->summary);
     return $info;
 }
开发者ID:basstreumer,项目名称:emplexer,代码行数:10,代码来源:emplexer_movie_list.php

示例13: run

 private static function run($op, $args = array())
 {
     $cmd = dirname(__FILE__) . self::ARESCAM_CTL . ' ' . $op;
     foreach ($args as $name => $value) {
         $value = escapeshellarg($value);
         $cmd .= " {$name} {$value}";
     }
     $out = system($cmd, $rc);
     hd_print("DAEMON: cmd '{$cmd}'; rc {$rc}; output '{$out}'");
     return (object) array('output' => $out, 'rc' => $rc);
 }
开发者ID:denpamusic,项目名称:ztv_dune_hd,代码行数:11,代码来源:ztv_daemon_controller.php

示例14: get_out_type_code

 public function get_out_type_code($op_code)
 {
     static $map = null;
     if (is_null($map)) {
         $map = array(PLUGIN_OP_GET_FOLDER_VIEW => PLUGIN_OUT_DATA_PLUGIN_FOLDER_VIEW, PLUGIN_OP_GET_NEXT_FOLDER_VIEW => PLUGIN_OUT_DATA_PLUGIN_FOLDER_VIEW, PLUGIN_OP_GET_REGULAR_FOLDER_ITEMS => PLUGIN_OUT_DATA_PLUGIN_REGULAR_FOLDER_RANGE, PLUGIN_OP_HANDLE_USER_INPUT => PLUGIN_OUT_DATA_GUI_ACTION, PLUGIN_OP_GET_TV_INFO => PLUGIN_OUT_DATA_PLUGIN_TV_INFO, PLUGIN_OP_GET_DAY_EPG => PLUGIN_OUT_DATA_PLUGIN_TV_EPG_PROGRAM_LIST, PLUGIN_OP_GET_TV_PLAYBACK_URL => PLUGIN_OUT_DATA_URL, PLUGIN_OP_GET_TV_STREAM_URL => PLUGIN_OUT_DATA_URL, PLUGIN_OP_GET_VOD_INFO => PLUGIN_OUT_DATA_PLUGIN_VOD_INFO, PLUGIN_OP_GET_VOD_STREAM_URL => PLUGIN_OUT_DATA_URL, PLUGIN_OP_CHANGE_TV_FAVORITES => PLUGIN_OUT_DATA_GUI_ACTION);
     }
     if (!isset($map[$op_code])) {
         hd_print("Error: get_out_type_code(): unknown operation code: '{$op_code}'.");
         throw new Exception("Uknown operation code");
     }
     return $map[$op_code];
 }
开发者ID:basstreumer,项目名称:emplexer,代码行数:12,代码来源:dune_plugin_fw.php

示例15: setFileToArchive

 public function setFileToArchive($fileName, $fileUrl)
 {
     hd_print(__METHOD__ . ': useCache = ' . EmplexerConfig::getInstance()->getUseCache());
     //no cache
     if (EmplexerConfig::getInstance()->getUseCache()) {
         // hd_print( __METHOD__ .  ': Entrou.... ' );
         //hd_print(__METHOD__ . " fileName=$fileName, fileUrl=$fileUrl");
         $this->urls[$fileName] = $fileUrl;
         EmplexerFifoController::getInstance()->downloadToCache($fileName, $fileUrl);
     } else {
         // hd_print( __METHOD__ .  ': Não Entrou.... ' . $fileUrl);
     }
 }
开发者ID:basstreumer,项目名称:emplexer,代码行数:13,代码来源:emplexer_archive.php


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