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


PHP FileSet::setIncludes方法代码示例

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


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

示例1: schemaConfiguration

 protected function schemaConfiguration(Task $task)
 {
     // Adds schema(s) to task
     foreach ($this->schemas as $pair) {
         $fileSet = new FileSet();
         $fileSet->setDir($pair[0]);
         $fileSet->setIncludes($pair[1]);
         $task->addSchemaFileset($fileSet);
     }
     // Sets up output dir, for class, SQL or conf output
     $task->setOutputDirectory(new PhingFile($this->outputDir));
 }
开发者ID:halfer,项目名称:Meshing,代码行数:12,代码来源:SchemaTask.php

示例2: main

 /**
  * Reads the corresponding actions and templates of the cronk (if any) from cronk.xml
  * and creates two references "cronkTemplate" and "cronkAction" which can be used to access these files
  */
 public function main()
 {
     $templates = array();
     $actionPath = "";
     $action = null;
     $module = null;
     $cronkName = $this->project->getUserProperty("cronkName");
     // Setup and load the DOM of the cronk
     $DOM = new DOMDocument("1.0", "UTF-8");
     $DOM->load($this->getFile());
     $DOMSearcher = new DOMXPath($DOM);
     $DOMSearcher->registerNamespace("default", "http://agavi.org/agavi/1.0/config");
     $DOMSearcher->registerNamespace("ae", "http://agavi.org/agavi/config/global/envelope/1.0");
     $cronkTemplates = $DOMSearcher->query("//ae:parameter[@name='" . $cronkName . "']//ae:parameter[@name='template']");
     if ($cronkTemplates->length > 0) {
         foreach ($cronkTemplates as $template) {
             $templates[] = $template->nodeValue;
         }
     }
     // fetch action and module
     $action = $DOMSearcher->query("//ae:parameter[@name='" . $cronkName . "']//ae:parameter[@name='action']")->item(0);
     $module = $DOMSearcher->query("//ae:parameter[@name='" . $cronkName . "']//ae:parameter[@name='module']")->item(0);
     $actionName = str_replace(".", "/", $action->nodeValue);
     // add agavi action,validation, view and templates
     $cronkFS = new FileSet();
     $cronkFS->setDir($this->project->getUserProperty("PATH_Icinga") . "/app/modules/" . $module->nodeValue);
     $cronkIncludes = "actions/" . $actionName . "Action.class.php";
     $cronkIncludes .= ",templates/" . $actionName . "*.class.php";
     $cronkIncludes .= ",validate/" . $actionName . ".xml";
     $cronkIncludes .= ",views/" . $actionName . "*.class.php";
     $cronkFS->setIncludes($cronkIncludes);
     // add templates
     $templateFs = new FileSet();
     $templateFs->setDir($this->project->getUserProperty("PATH_Icinga") . "/app/modules/Cronks/data/xml/");
     $includes = "";
     $first = true;
     foreach ($templates as $template) {
         $includes .= ($first ? '' : ',') . $template . ".xml";
     }
     // export to phing
     $templateFs->setIncludes($includes);
     $this->project->addReference("cronkTemplates", $templateFs);
     $this->project->addReference("cronkAction", $cronkFS);
 }
开发者ID:philippjenni,项目名称:icinga-web,代码行数:48,代码来源:cronkMetaExtractorTask.php

示例3: setIncludes

 /**
  * Sets the set of include patterns. Patterns may be separated by a comma
  * or a space.
  *
  * @param string $includes the string containing the include patterns
  * @return void
  */
 public function setIncludes($includes)
 {
     $this->fileset->setIncludes($includes);
 }
开发者ID:umesecke,项目名称:phing,代码行数:11,代码来源:MatchingTask.php

示例4: getSQLDescriptors

 /**
  * Returns a file descriptior with the sql files
  * @return FileSet 
  */
 protected function getSQLDescriptors()
 {
     $xml = $this->getManifest()->getManifestAsSimpleXML();
     $db = $xml->Database;
     $sqlList = new FileSet();
     $sqlList->setDir($this->project->getUserProperty("PATH_Icinga"));
     $includes = null;
     if (!$db->SQLRoutines) {
         $sqlList->setExcludes("**");
     }
     return $sqlList;
     foreach ($db->SQLRoutines->children() as $type => $content) {
         $type = (string) $type;
         $content = $this->getPath((string) $content);
         switch ($type) {
             case 'File':
                 if ($includes != "") {
                     $includes .= ",";
                 }
                 $includes .= $content;
                 break;
             case 'Folder':
                 if ($includes != "") {
                     $includes .= ",";
                 }
                 $includes .= $content . "/**";
                 break;
         }
     }
     $sqlList->setIncludes($includes);
     return $sqlList;
 }
开发者ID:philippjenni,项目名称:icinga-web,代码行数:36,代码来源:fileSelectorTask.php


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