Exemplo n.º 1
0
 /**
  * Process a resource
  *
  * @param string $manifestroot
  * @param string $fname
  * @param string $folder
  */
 public function process_resource($manifestroot, &$fname, $folder)
 {
     $file = empty($folder) ? $manifestroot . '/' . $fname : $manifestroot . '/' . $folder . '/' . $fname;
     if (!file_exists($file) && $this->throwonerror) {
         throw new Exception('The file doesnt exist!');
     }
     //TODO: ver el tema de fpatch con el tema de unix y windows
     //$fpathtocheck = $this->adjust_path($manifestroot,$fname);
     //!empty($fpathtocheck) &&
     if (GetDepFiles($manifestroot, $fname, $this->folder, $this->files)) {
         array_unshift($this->files, $folder . $fname);
         $this->init_empty_new();
         $this->href = $folder . $fname;
         $this->identifierref = $folder . $fname;
         $this->filename = $fname;
         $this->isempty = false;
         $this->folder = $folder;
     } else {
         $this->init_clean();
     }
 }
Exemplo n.º 2
0
 /**
  * Process a resource
  *
  * @param string $manifestroot
  * @param string $fname
  * @param string $folder
  */
 public function process_resource($manifestroot, &$fname, $folder)
 {
     $file = empty($folder) ? $manifestroot . '/' . $fname : $manifestroot . '/' . $folder . '/' . $fname;
     if (!file_exists($file) && $this->throwonerror) {
         throw new Exception('The file doesnt exist!');
     }
     GetDepFiles($manifestroot, $fname, $this->folder, $this->files);
     array_unshift($this->files, $folder . $fname);
     $this->init_empty_new();
     $this->href = $folder . $fname;
     $this->identifierref = $folder . $fname;
     $this->filename = $fname;
     $this->isempty = false;
     $this->folder = $folder;
 }