public function __get($field) { if ('contents' == $field and !$this->offsetExists('contents')) { if (isset($this->contents)) { $uploads = wp_upload_dir(); $this['contents'] = file_get_contents($uploads['basedir'] . DIRECTORY_SEPARATOR . PMXI_Plugin::HISTORY_DIRECTORY . DIRECTORY_SEPARATOR . $this->id); } else { $this->contents = NULL; } } return parent::__get($field); }
public function __get($field) { if ('contents' == $field and !$this->offsetExists('contents')) { if (isset($this->contents)) { $uploads = wp_upload_dir(); $this['contents'] = file_get_contents($uploads['basedir'] . '/wpallimport/history/' . $this->id); } else { $this->contents = NULL; } } return parent::__get($field); }