public function run() { if ($this->hasRun()) { return TRUE; } if (empty($this->filename)) { // || empty($this->class) return FALSE; } if (!file_exists($this->filename)) { // [TODO] needs some file error handling return FALSE; } require_once $this->filename; // [TODO] Check that the class we want exists // $object = new $$this->class; // [TODO] Need to catch failures here (when we wrap in classes) DAO_Platform::setPatchRan($this->plugin_id, $this->revision); return TRUE; }
public function run() { if ($this->hasRun()) { return TRUE; } if (empty($this->filename) || !file_exists($this->filename)) { return FALSE; } if (false === ($result = (require_once $this->filename))) { return FALSE; } DAO_Platform::setPatchRan($this->plugin_id, $this->revision); return TRUE; }