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


PHP apf_require_page函数代码示例

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


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

示例1: apf_require_page

<?php

apf_require_page('MobileBasePage');
class Wiki_WikiPage extends MobileBasePage
{
    public function get_decorator()
    {
        return 'decorators/Wiki';
    }
    public function get_view()
    {
        $attrs = APF::get_instance()->get_request()->get_attributes();
        foreach ($attrs as $key => $attr) {
            $this->assign_data($key, $attr);
        }
        return 'Wiki';
    }
    public function get_title()
    {
        return '经纪人移动API文档';
    }
}
# end of this file
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:23,代码来源:Wiki.php

示例2: apf_require_page

<?php

apf_require_page('iBugDecorator');
class Ddcomponent_AddPage extends iBugDecoratorPage
{
    public static function use_boundable_styles()
    {
        $path = apf_classname_to_path(__CLASS__);
        return array_merge(parent::use_boundable_styles(), array($path . 'Add.css'));
    }
    public static function use_boundable_javascripts()
    {
        $path = apf_classname_to_path(__CLASS__);
        return array_merge(parent::use_boundable_javascripts(), array($path . "Add.js"));
    }
    public function get_view()
    {
        return 'Add';
    }
}
开发者ID:emilymwang8,项目名称:ibug,代码行数:20,代码来源:Add.php

示例3: fetch_boundable_resources

 /**
  * 实际结果就是更新APF->boundable_resources变量,将用到的资源文件(整合)路径信息
  * 记录到boundable_resources中。
  * @todo 非递归实现
  * @param string $class 文件名<->资源文件名与页面类名是一一对应的
  * @param string $ext 文件扩展名
  * @param boolen $is_page 是否为页面类
  */
 protected function fetch_boundable_resources($class, $ext, $is_page = false)
 {
     if ($is_page) {
         if ($pos = strpos($class, "(")) {
             $class = substr($class, 0, $pos);
         }
         apf_require_page($class);
         $path = "page/";
         $class = $class . "Page";
     } else {
         // 载入组件类
         apf_require_component($class);
         $path = "component/";
         $class = $class . "Component";
     }
     if (!class_exists($class)) {
         return false;
     }
     // 获取组件(页面)使用的组件列表
     eval("\$list = {$class}" . "::use_component();");
     foreach ($list as $item) {
         // 载入所有子组件用到的资源文件
         $this->fetch_boundable_resources($item, $ext);
     }
     // 获取用到的资源文件相对路径
     if ($ext == 'js') {
         eval("\$list = {$class}::use_boundable_javascripts();");
     } elseif ($ext == 'css') {
         eval("\$list = {$class}::use_boundable_styles();");
     } else {
         trigger_error("Unknown extention \"{$ext}\"", E_USER_WARNING);
         $list = array();
     }
     $apf = APF::get_instance();
     foreach ($list as $item) {
         // 获取资源文件的绝对路径
         $apf->prcess_resource_url($path, $item, $this->boundable_resources);
     }
     return true;
 }
开发者ID:uedcw,项目名称:webstory,代码行数:48,代码来源:Resources.php

示例4: load_component

 /**
  * @param string $class
  * @return APF_Component
  */
 public function load_component($parent, $class, $is_page = false)
 {
     $flag = true;
     if ($is_page) {
         $this->debug("load page: {$class}");
         $flag = apf_require_page($class);
         $class = $class . "Page";
     } else {
         $this->debug("load component: {$class}");
         $flag = apf_require_component($class);
         $class = $class . "Component";
     }
     if (!$flag && substr($class, 0, 3) == "HK_") {
         $class = substr($class, 3);
     }
     $this->html_id++;
     return new $class($parent, self::HTML_ID_PREFIX . $this->html_id);
 }
开发者ID:uedcw,项目名称:webstory,代码行数:22,代码来源:APF.php

示例5: apf_require_page

<?php

/**
 * Created by PhpStorm.
 * User: emily
 * Date: 8/31/15
 * Time: 10:52 PM
 */
apf_require_page("CMS");
class Group_UsertopicsPage extends CMSPage
{
    public static function use_boundable_styles()
    {
        $path = apf_classname_to_path(__CLASS__);
        return array_merge(parent::use_boundable_styles(), array());
    }
    public static function use_boundable_javascripts()
    {
        $path = apf_classname_to_path(__CLASS__);
        return array_merge(parent::use_boundable_javascripts(), array());
    }
    public function get_title()
    {
        $str = "安居客CMS系统";
        return $str;
    }
    public function get_head_sections()
    {
        $sections = parent::get_head_sections();
        return $sections;
    }
开发者ID:emilymwang8,项目名称:cms,代码行数:31,代码来源:Usertopics.php

示例6: apf_require_page

<?php

apf_require_page("BrokerBase");
class MobileBasePage extends BrokerBasePage
{
    public function get_decorator()
    {
        return parent::get_decorator();
    }
    public function get_view()
    {
        return "MobileBase";
    }
}
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:14,代码来源:MobileBase.php

示例7: apf_require_controller

<?php

apf_require_controller('Abstract');
apf_require_page('Abstract');
apf_require_class('Biz_Project');
apf_require_class('Biz_OperateLog');
apf_require_class('Biz_Exclude');
apf_require_class('Biz_Host');
class HostController extends AbstractController
{
    public function handle_request_internel()
    {
        switch ($this->_match[1]) {
            case 'edit':
                return $this->_edit();
                break;
        }
    }
    private function _edit()
    {
        if ($this->_request->is_post_method()) {
            $this->_save();
        }
        $pid = intval($this->_param['pid']);
        $hosts = Biz_Host::get_instance()->get_host($pid);
        $host_br = array();
        foreach ($hosts as $host) {
            $host_br[] = $host->hostname;
        }
        $host_br = implode("\n", $host_br);
        $this->_request->set_attribute('page_title', '修改 主机名');
开发者ID:rh20083907,项目名称:ipublish,代码行数:31,代码来源:Host.php

示例8: apf_require_class

<?php

apf_require_class("PageHelper");
apf_require_page("AnjukeBrokerShare");
class User_Statistics_BrokerStatisticsPage extends BrokerBasePage
{
    public function get_header()
    {
        return 'Global_Broker_BrokerShareHeaderSimple';
    }
    public function get_view()
    {
        $request = APF::get_instance()->get_request();
        $pageParams = $request->get_attributes();
        foreach ($pageParams as $k => $v) {
            $this->assign_data($k, $v);
        }
        $this->assign_data('actionURL', $request->get_request_url());
        $business = $pageParams['business'];
        $templateList = array('ajk' => 'BrokerStatisticsAjk', 'hz' => 'BrokerStatisticsHz', 'jp' => 'BrokerStatisticsJp');
        if (isset($templateList[$business])) {
            return $templateList[$business];
        }
        return 'BrokerStatistics';
    }
    public static function use_javascripts()
    {
        $path = apf_classname_to_path(__CLASS__);
        return array_merge(parent::use_javascripts(), array(array(PageHelper::pure_static_url("/js/jquery-ui/jquery-ui-1.10.4.custom.min.js")), array(PageHelper::pure_static_url("/js/jquery.align.js"), PHP_INT_MAX - 1)));
    }
    public static function use_styles()
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:31,代码来源:BrokerStatistics.php

示例9: apf_require_page

<?php

apf_require_page('BrokerBasePage');
class Home_BrokerHomePage extends BrokerBasePage
{
    public function get_view()
    {
        return 'BrokerHome';
    }
    public function get_title()
    {
        return '经纪人后台首页的Demo';
    }
    public static function use_boundable_javascripts()
    {
        $path = apf_classname_to_path(__CLASS__);
        return array_merge(parent::use_boundable_javascripts(), array($path . 'BrokerHome.js'));
    }
    public static function use_boundable_styles()
    {
        $path = apf_classname_to_path(__CLASS__);
        return array_merge(parent::use_boundable_styles(), array($path . 'BrokerHome.css'));
    }
    public function get_actived_tab()
    {
        return 'home';
    }
    public function get_sub_nav()
    {
        return null;
    }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:31,代码来源:BrokerHome.php

示例10: fetch_boundable_resources

 protected function fetch_boundable_resources($class, $ext, $is_page = false)
 {
     if ($is_page) {
         apf_require_page($class);
         $path = "page/";
         $class = $class . "Page";
     } else {
         apf_require_component($class);
         $path = "component/";
         $class = $class . "Component";
     }
     if (!class_exists($class)) {
         return false;
     }
     eval("\$list = {$class}" . "::use_component();");
     foreach ($list as $item) {
         $this->fetch_boundable_resources($item, $ext);
     }
     if ($ext == 'js') {
         eval("\$list = {$class}::use_boundable_javascripts();");
     } elseif ($ext == 'css') {
         eval("\$list = {$class}::use_boundable_styles();");
     } else {
         trigger_error("Unknown extention \"{$ext}\"", E_USER_WARNING);
         $list = array();
     }
     $apf = APF::get_instance();
     foreach ($list as $item) {
         $apf->prcess_resource_url($path, $item, $this->boundable_resources);
     }
     return true;
     //if (!$this->include_resource_file($item[0])) {
     //    trigger_error("Unable to include resource \"".$item[0]."\"", E_USER_WARNING);
     //}
 }
开发者ID:rh20083907,项目名称:ipublish,代码行数:35,代码来源:Resources.php

示例11: apf_require_page

<?php

/**
 * Created by PhpStorm.
 * User: emily
 * Date: 8/31/15
 * Time: 11:28 PM
 */
apf_require_page('CMS');
class Group_TestPage extends CMSPage
{
    public static function use_boundable_styles()
    {
        $path = apf_classname_to_path(__CLASS__);
        return array_merge(parent::use_boundable_styles(), array($path . "Appeal.css"));
    }
    public static function use_boundable_javascripts()
    {
        $path = apf_classname_to_path(__CLASS__);
        return array_merge(parent::use_boundable_javascripts(), array($path . 'Test.js', $path . "ajaxfileupload.js"));
    }
    public function get_title()
    {
        $str = "安居客CMS系统";
        return $str;
    }
    public function get_head_sections()
    {
        $sections = parent::get_head_sections();
        return $sections;
    }
开发者ID:emilymwang8,项目名称:cms,代码行数:31,代码来源:Test.php

示例12: apf_require_page

<?php

apf_require_page('Base');
class IndexPage extends BasePage
{
    public function get_view()
    {
        return 'Index';
    }
    public function get_title()
    {
        return 'v2 Demo';
    }
    public static function use_boundable_javascripts()
    {
        return array('Index.js');
    }
}
开发者ID:emilymwang8,项目名称:apfv2-demo,代码行数:18,代码来源:index.php


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