Пример #1
0
 /**
  * Retrieve the list of not installed upgrade filenames sorted by version_compare.
  * The list could be filtered by optional 'from' parameter.
  * This parameter is usefull, when the module is installed previously
  *
  * @param string $from
  * @return array
  */
 public function getUpgradesToRun($from = null)
 {
     if (null === $from) {
         $from = $this->module->getDataVersion();
     }
     $upgrades = array();
     foreach ($this->getUpgradeFiles() as $version => $filename) {
         if (version_compare($from, $version) >= 0) {
             continue;
         }
         $upgrades[$version] = $filename;
     }
     return $upgrades;
 }