コード例 #1
0
ファイル: ReferenceJudgement.php プロジェクト: jlsa/justitia
 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;
 }
コード例 #2
0
ファイル: Entity.php プロジェクト: jlsa/justitia
 function writable_files()
 {
     $files = $this->attribute('writable files');
     return $files ? explode_whitespace($files) : array();
 }