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


PHP reason_include_once函数代码示例

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


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

示例1: _add_embed_code

 /**
  * Adds the embed code field to the page.
  * @param $entity
  * @param $displayer
  */
 private function _add_embed_code($entity)
 {
     reason_include_once('classes/media/kaltura/media_work_displayer.php');
     $displayer = new KalturaMediaWorkDisplayer();
     $displayer->set_media_work($entity);
     if ($entity->get_value('av_type') == 'Video') {
         $displayer->set_height('small');
         $embed_markup_small = $displayer->get_display_markup();
         $displayer->set_height('medium');
         $embed_markup_medium = $displayer->get_display_markup();
         $displayer->set_height('large');
         $embed_markup_large = $displayer->get_display_markup();
         if (!empty($embed_markup_small)) {
             $this->_show_embed_item('Small Embedding Code', $embed_markup_small);
             $this->_show_embed_item('Medium Embedding Code', $embed_markup_medium);
             $this->_show_embed_item('Large Embedding Code', $embed_markup_large);
         }
     } else {
         $displayer->set_height('small');
         $embed_markup_small = $displayer->get_display_markup();
         if (!empty($embed_markup_small)) {
             $this->_show_embed_item('Audio Embedding Code', $embed_markup_small);
         }
     }
 }
开发者ID:natepixel,项目名称:reason_package,代码行数:30,代码来源:media_work_previewer_modifier.php

示例2: get_feed_as_text

function get_feed_as_text($params)
{
    if (!empty($params['type_id'])) {
        $type = new entity($params['type_id']);
        if (!empty($params['feed'])) {
            $feed_file = $params['feed'];
        } elseif ($type->get_value('custom_feed')) {
            $feed_file = str_replace('.php', '', $type->get_value('custom_feed'));
        } else {
            $feed_file = 'default';
            // otherwise use default feed script
        }
        reason_include_once('feeds/' . $feed_file . '.php');
        $feed_class = $GLOBALS['_feed_class_names'][$feed_file];
        if (!empty($params['site_id'])) {
            $site = new entity($params['site_id']);
            $feed = new $feed_class($type, $site);
        } else {
            $feed = new $feed_class($type);
        }
        $feed->set_request_vars($params);
        ob_start();
        $feed->run(false);
        $feed_text = ob_get_contents();
        ob_end_clean();
        if (!empty($feed_text)) {
            return $feed_text;
        }
    }
}
开发者ID:hunter2814,项目名称:reason_package,代码行数:30,代码来源:feed_utils.php

示例3: run

 function run()
 {
     reason_include_once('minisite_templates/modules/magpie/reason_rss.php');
     $rfd = new reasonFeedDisplay();
     $rfd->set_location($this->feed_location, $this->is_remote);
     if (isset($this->disable_cache)) {
         $rfd->set_cache_disable($this->disable_cache);
     }
     if (isset($this->params['display_timestamp'])) {
         $rfd->set_display_timestamp($this->params['display_timestamp']);
     }
     if (isset($this->params['show_entries_lacking_description'])) {
         $rfd->set_show_entries_lacking_description($this->params['show_entries_lacking_description']);
     }
     $rfd->set_page_query_string_key('view_page');
     $rfd->set_search_query_string_key('search');
     if (!empty($this->request['view_page'])) {
         $rfd->set_page($this->request['view_page']);
     }
     if (!empty($this->request['search'])) {
         $rfd->set_search_string($this->request['search']);
     }
     if (!empty($this->params['num_per_page'])) {
         $rfd->set_num_in_nav($this->params['num_per_page']);
     }
     if (!empty($this->params['title'])) {
         $rfd->set_title($this->params['title']);
     }
     echo $rfd->display_feed('nav');
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:30,代码来源:magpie_feed_nav.php

示例4: _build_content_manager

 function _build_content_manager()
 {
     reason_include_once('content_managers/default.php3');
     $content_handler = $GLOBALS['_content_manager_class_names']['default.php3'];
     if ($this->type_entity->get_value('custom_content_handler')) {
         $include_file = 'content_managers/' . $this->type_entity->get_value('custom_content_handler');
         reason_include_once($include_file);
         if (!empty($GLOBALS['_content_manager_class_names'][$this->type_entity->get_value('custom_content_handler')])) {
             $content_handler = $GLOBALS['_content_manager_class_names'][$this->type_entity->get_value('custom_content_handler')];
         } else {
             trigger_error('Content handler not found in ' . $include_file);
         }
     }
     if (!class_exists($content_handler)) {
         $filename = $this->type_entity->get_value('custom_content_handler') ? $this->type_entity->get_value('custom_content_handler') : 'default.php3';
         trigger_error('Content manager class name provided for ' . $filename . ' (' . $content_handler . ') not found', HIGH);
         die;
     }
     $disco_item = new $content_handler();
     $disco_item->admin_page =& $this->admin_page;
     $disco_item->set_head_items($this->head_items);
     $disco_item->prep_for_run($this->admin_page->site_id, $this->admin_page->type_id, $this->admin_page->id, $this->admin_page->user_id);
     $disco_item->init();
     return $disco_item;
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:25,代码来源:editor.php

示例5: reasonAVDIsplay

 function reasonAVDIsplay($displayer = REASON_DEFAULT_AV_DISPLAYER)
 {
     $override = false;
     reason_include_once('classes/av_displayers/' . $displayer . '.php');
     if (empty($GLOBALS['reason_av_displayers'][$displayer])) {
         if (REASON_DEFAULT_AV_DISPLAYER == $displayer) {
             trigger_error('Default AV displayer (' . $displayer . ') did not register itself; giving up.', HIGH);
             return;
         }
         trigger_error($displayer . ' AV displayer did not register itself in the $GLOBALS array. Using default displayer instead (' . REASON_DEFAULT_AV_DISPLAYER . ').');
         $this->reasonAVDIsplay();
         $override = true;
     } elseif (!class_exists($GLOBALS['reason_av_displayers'][$displayer])) {
         if (REASON_DEFAULT_AV_DISPLAYER == $displayer) {
             trigger_error('Default AV displayer class (' . $GLOBALS['reason_av_displayers'][$displayer] . ') does not exist; giving up.', HIGH);
             return;
         }
         trigger_error('Class defined for displayer (' . $GLOBALS['reason_av_displayers'][$displayer] . ') does not exist. Using default displayer (' . REASON_DEFAULT_AV_DISPLAYER . ').');
         $override = true;
     }
     if ($override) {
         $this->reasonAVDIsplay();
         return;
     }
     $this->_displayer = new $GLOBALS['reason_av_displayers'][$displayer]();
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:26,代码来源:av_display.php

示例6: pre_request_cleanup_init

 /**
  * Set the model and view from parameters before we grab the request
  * @author Nathan White
  */
 function pre_request_cleanup_init()
 {
     // check page type for custom model and view
     if (isset($this->params['model'])) {
         $this->model_name = $this->params['model'];
     }
     if (isset($this->params['view'])) {
         $this->view_name = $this->params['view'];
     }
     $model_path = '/minisite_templates/modules/classified/' . $this->model_name . '.php';
     $view_path = '/minisite_templates/modules/classified/' . $this->view_name . '.php';
     if (reason_file_exists($model_path)) {
         reason_include_once($model_path);
     } else {
         trigger_error('The classified module model could not be found at ' . $model_path, FATAL);
     }
     if (reason_file_exists($view_path)) {
         reason_include_once($view_path);
     } else {
         trigger_error('The classified module view could not be found at ' . $view_path, FATAL);
     }
     // initialize the class names
     $model_classname = $GLOBALS['_classified_module_model']['classified/' . $this->model_name];
     $view_classname = $GLOBALS['_classified_module_view']['classified/' . $this->view_name];
     // create the model and pass it some basic info
     $this->model = new $model_classname();
     $this->model->set_site_id($this->site_id);
     $this->model->set_head_items($this->parent->head_items);
     // create the view and pass a reference to the model
     $this->view = new $view_classname();
     $this->view->set_model($this->model);
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:36,代码来源:classified.php

示例7: _construct

 /**
  * Gets the correct class for the given library and module. More documentation to come...
  */
 private static function _construct($entity_or_library, $module, $filename = false, $meta_info = false)
 {
     $library = self::_get_library($entity_or_library);
     if (!$filename) {
         $filename = 'classes/media/' . $library . '/' . $module . '.php';
     }
     if (reason_file_exists($filename)) {
         reason_include_once($filename);
         $classname = self::_convert_to_camel_case($module);
         if ($meta_info) {
             $library_classname = ucfirst($library) . $meta_info . $classname;
         } else {
             $library_classname = ucfirst($library) . $classname;
         }
         if (class_exists($library_classname)) {
             $interface_file = 'classes/media/interfaces/' . $module . '_interface.php';
             if (reason_file_exists($interface_file)) {
                 reason_include_once($interface_file);
                 $class = new $library_classname();
                 $implemented = class_implements($class);
                 if (isset($implemented[$classname . 'Interface'])) {
                     return $class;
                 } else {
                     trigger_error($library_classname . ' must implement ' . $classname . 'Interface.');
                 }
             } else {
                 trigger_error($module . ' interface file does not exist: ' . $interface_file);
             }
         } else {
             trigger_error($module . ' class does not exist: ' . $library_classname);
         }
     } else {
         trigger_error($module . ' file does not exist: ' . $filename);
     }
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:38,代码来源:factory.php

示例8: setup_api

 /**
  * Load and configure the appropriate model.
  *
  * Right now we hard code this - it could be made to dynamically look in the model folder.
  */
 final function setup_api()
 {
     if (isset($_GET['type'])) {
         if ($_GET['type'] === 'image') {
             reason_include_once('classes/api/feed/models/image.php');
             $model = new ReasonImageJSON();
             $this->set_model($model);
         } elseif ($_GET['type'] === 'linkTypeList') {
             reason_include_once('classes/api/feed/models/link.php');
             $model = new ReasonLinkTypeListJSON();
             $this->set_model($model);
         } elseif ($_GET['type'] === 'siteList') {
             reason_include_once('classes/api/feed/models/link.php');
             $model = new ReasonSiteListJSON();
             $this->set_model($model);
         } elseif ($_GET['type'] === 'pageList') {
             reason_include_once('classes/api/feed/models/link.php');
             $model = new ReasonPageListJSON();
             $this->set_model($model);
         } elseif ($_GET['type'] == 'assetList') {
             reason_include_once('classes/api/feed/models/link.php');
             $model = new ReasonAssetListJSON();
             $this->set_model($model);
         }
     }
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:31,代码来源:feed.php

示例9: run

 function run()
 {
     reason_include_once('minisite_templates/modules/magpie/reason_rss.php');
     $rfd = new reasonFeedDisplay();
     $rfd->set_page_query_string_key('view_page');
     $rfd->set_search_query_string_key('search');
     echo $rfd->generate_search();
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:8,代码来源:magpie_feed_search.php

示例10: get_selection_page_set

 function get_selection_page_set($site_id)
 {
     reason_include_once('minisite_templates/nav_classes/default.php');
     $pages = new MinisiteNavigation();
     $site = new entity($site_id);
     $pages->site_info = $site;
     $pages->init($site_id, id_of('minisite_page'));
     return $this->flatten_page_tree($pages->get_tree_data());
 }
开发者ID:natepixel,项目名称:reason_package,代码行数:9,代码来源:image_import.php

示例11: init

 function init($args = array())
 {
     parent::init($args);
     // force secure form due to a bug that causes images not to work in unsecure environment
     if (!on_secure_page()) {
         reason_include_once('function_libraries/user_functions.php');
         force_secure_if_available();
     }
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:9,代码来源:editor_demo.php

示例12: get_reason_page_cache

 function get_reason_page_cache()
 {
     if (!isset($this->_reason_page_cache)) {
         reason_include_once('classes/page_cache.php');
         $this->_reason_page_cache = new ReasonPageCache();
         $this->_reason_page_cache->set_site_id($this->admin_page->site_id);
         $this->_reason_page_cache->set_page_id($this->admin_page->id);
     }
     return $this->_reason_page_cache;
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:10,代码来源:page.php

示例13: run

 /**
  * run the rewrite rules
  */
 function run()
 {
     $urlm = new url_manager($this->vars['site_id']);
     $urlm->update_rewrites();
     // if a page was just deleted, lets also clear the nav cache for the site
     if ($this->vars['type_id'] == id_of('minisite_page')) {
         reason_include_once('classes/object_cache.php');
         $cache = new ReasonObjectCache($this->vars['site_id'] . '_navigation_cache');
         $cache->clear();
     }
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:14,代码来源:update_rewrites.php

示例14: _get_template

 protected function _get_template()
 {
     if (!isset($this->template)) {
         reason_include_once('minisite_templates/modules/events_gallery/templates/' . str_replace('../', '', $this->params['template']) . '.php');
         $classname = 'eventsGallery' . ucfirst($this->params['template']) . 'Template';
         if (class_exists($classname)) {
             $this->template = new $classname();
         }
     }
     return $this->template;
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:11,代码来源:module.php

示例15: pre_request_cleanup_init

 function pre_request_cleanup_init()
 {
     if (reason_include_once($this->params['form_include']) == false) {
         trigger_error('DiscoModule tried to include a file but failed.  Check your "form_include" setting in the page_types');
     }
     $this->form = new $this->params['form_name']();
     $this->form->add_element('site_id', 'hidden');
     $this->form->add_element('page_id', 'hidden');
     $this->form->set_value('site_id', $this->site_id);
     $this->form->set_value('page_id', $this->page_id);
     $this->form->init();
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:12,代码来源:disco_module.php


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