Example #1
0
 /**
  * Sets the set of exclude patterns. Patterns may be separated by a comma
  * or a space.
  *
  * @param string $excludes the string containing the exclude patterns
  */
 public function setExcludes($excludes)
 {
     $this->fileset->setExcludes($excludes);
 }
 /**
  * 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;
 }