/** * Perform the complete update. * * @param \iveeCrest\EndpointHandler $eph to be used * @param bool $verbose whether info should be printed to console * * @return void */ public static function doUpdate(EndpointHandler $eph, $verbose = true) { if ($verbose) { echo get_called_class() . ' getting data from CREST... '; } //fetch the data, check returned representation name $data = static::getData($eph); if ($verbose) { echo "Done" . PHP_EOL . 'Saving data in DB... '; } //store in DB $cdu = new static($data); $cdu->insertIntoDB(); if ($verbose) { echo 'Done' . PHP_EOL; } }
/** * Perform the complete update * * @return void */ public static function doUpdate() { //get CrestFetcher class name and instantiate $crestFetcherClass = \iveeCore\Config::getIveeClassName('CrestFetcher'); $cf = new $crestFetcherClass(); echo get_called_class() . ' getting data from CREST... '; //fetch the data, check returned representation name $data = $cf->getCrestData(static::$path, static::$representationName); echo "Done" . PHP_EOL . 'Saving data in DB... '; //store in DB $citu = new static($data); $citu->insertIntoDB(); echo 'Done' . PHP_EOL; }