當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。