Exemplo n.º 1
0
 protected function get_source_files()
 {
     $filenames = explode_whitespace($this->entity->reference_implementation());
     $files = array();
     foreach ($filenames as $name) {
         $full_path = $this->entity->data_path() . $name;
         if (!file_exists($full_path)) {
             throw new Exception("Reference implementation not found: {$name}");
         }
         $contents = file_get_contents($full_path);
         $files[$name] = $contents;
     }
     return $files;
 }
Exemplo n.º 2
0
 function writable_files()
 {
     $files = $this->attribute('writable files');
     return $files ? explode_whitespace($files) : array();
 }