/** * how long might we expect this export to take * * @return constant one of PORTFOLIO_TIME_XX */ public function expected_time() { $filetime = portfolio_expected_time_file($this->multifiles); $dbtime = portfolio_expected_time_db(count($this->exportdata['entries'])); return $filetime > $dbtime ? $filetime : $dbtime; }
/** * helper method to calculate expected time for multi or single file exports */ public function expected_time_file() { if ($this->multifiles) { return portfolio_expected_time_file($this->multifiles); } else { if ($this->singlefile) { return portfolio_expected_time_file($this->singlefile); } } return PORTFOLIO_TIME_LOW; }
function expected_time() { // a file based export if ($this->singlefile) { return portfolio_expected_time_file($this->singlefile); } else { //return portfolio_expected_time_db(count($this->certificat)); return PORTFOLIO_TIME_LOW; } }