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; }
function writable_files() { $files = $this->attribute('writable files'); return $files ? explode_whitespace($files) : array(); }