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


PHP XmlParser::started方法代码示例

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


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

示例1: strtok

 function __construct($type = self::PANEL, $dry_run = false, $step = false, $manual = false, $internal = false, $build = false)
 {
     if ($build) {
         $build = strtok(substr($build, 1), "?");
         $build_params = ArrayUtil::queryStringToArray(strtok("?"));
         $this->build = $build;
     } else {
         if (self::$instance) {
             return true;
         }
     }
     self::$started = true;
     if (!defined("NODES")) {
         define("NODES", 1);
     }
     if (!defined("VALUES")) {
         define("VALUES", 2);
     }
     if (!defined("ATTRIBUTES")) {
         define("ATTRIBUTES", 3);
     }
     if (!defined("PAIRS")) {
         define("PAIRS", 4);
     }
     $this->root = sfConfig::get("sf_root_dir");
     $this->schemaLocation = $this->root . "/plugins/appFlowerPlugin/schema/appflower.xsd";
     // Reading parser YML config
     //$tmp = sfYaml::load($this->root."/plugins/appFlowerPlugin/config/app.yml");
     $this->remove_fields = sfConfig::get("app_parser_remove_fields");
     // Context info
     $this->context = sfContext::getInstance();
     // Set Application..
     $this->application = $this->context->getConfiguration()->getApplication();
     // Set user
     $this->user = $this->context->getUser();
     // Add JS file list
     //$this->loadJSFilesList();
     // Action attributes..
     $actionInstance = $this->context->getActionStack()->getLastEntry()->getActionInstance();
     $this->attribute_holder = $actionInstance->getVarHolder()->getAll();
     // Request
     $this->request = $actionInstance->getRequest()->getParameterHolder()->getAll();
     foreach ($this->request as $param => $value) {
         if (!array_key_exists($param, $this->attribute_holder)) {
             $this->attribute_holder[$param] = $value;
         }
     }
     $this->currentUri = $actionInstance->getModuleName() . "/" . $actionInstance->getActionName();
     if ($build) {
         $uri = $build;
         $module = strtok($build, "/");
         $action = strtok("/");
         $this->currentUri = $module . "/" . $action;
     } else {
         $uri = $actionInstance->getModuleName() . "/" . $actionInstance->getActionName();
         $module = $actionInstance->getModuleName();
         $action = $actionInstance->getActionName();
     }
     $this->vars[$uri] = $this->attribute_holder;
     if ($build) {
         $config_vars = afConfigUtils::getConfigVars(strtok($build, "/"), strtok("/"), $this->context->getRequest());
         if ($build_params) {
             foreach ($build_params as $n => $p) {
                 $config_vars[$n] = $p;
             }
         }
         $this->vars[$uri] = $config_vars;
         $actionInstance->getVarHolder()->add($config_vars);
     }
     // Assign DOM Document..
     if (!$build) {
         $this->readXmlDocument();
     } else {
         $this->readXmlDocument(null, false, $build);
     }
     if (sfContext::getInstance()->has('profiler')) {
         $timer = sfTimerManager::getTimer('afRead');
         $timer->addTime();
         $timer = sfTimerManager::getTimer('afRender');
     }
     parent::__construct($this->document);
     $root = $this->document->getElementsByTagName("view")->item(0);
     $view_type = $root->getAttribute("type");
     $dynamic = $root->getAttribute("dynamic");
     $actionInstance->view = $view_type;
     if ($view_type == "layout") {
         $this->layoutModule = $actionInstance->layoutModule = $root->getAttribute("module");
     }
     $view_type = XmlBaseElementParser::parseValue($view_type, $root, true);
     $this->set("type", $view_type, $root);
     // Is this a Dynamic widget? If so, let's create update XML DOM.
     $this->namespace = $this->document->lookupNamespaceUri("i");
     if ($dynamic === "true") {
         $this->buildXmlDocument($module, $view_type);
     }
     // Parser type
     if ($view_type == "layout") {
         $this->type = self::PAGE;
     } else {
         if ($view_type == "wizard") {
//.........这里部分代码省略.........
开发者ID:cbsistem,项目名称:appflower_engine,代码行数:101,代码来源:XmlParser.class.php


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