/** * getExported * * @return array */ public function getExported() { $path = ProfileHelper::getPath(); $list = \JFolder::files($path . '/export/sql', '.', false, true); rsort($list); return $list; }
/** * sync * * @return bool */ public function sync() { $statusList = $this->status(); $path = ProfileHelper::getPath() . '/track.yml'; $trackList = array(); foreach ($statusList as $status) { $trackList['table'][$status['table']] = $status['status']; } $track = new Registry($trackList); $trackModel = new Track(); $trackModel->saveTrackList($track); $this->state->set('track.save.path', $trackModel->getState()->get('track.save.path')); return true; }
/** * Constructor */ public function __construct() { $this->global = SQLSYNC_LIB . '/Resource/track.yml'; $this->file = ProfileHelper::getPath() . '/track.yml'; parent::__construct(); }
/** * getPath * * @param string $type * * @return string */ public function getPath($type = 'yaml') { $ext = $type == 'yaml' ? 'yml' : $type; return ProfileHelper::getPath() . '/schema.' . $ext; }