Scalr\Upgrade\UpgradeHandler::loadUpdates PHP Метод

loadUpdates() защищенный Метод

Loads updates from the implemented classes
protected loadUpdates ( )
    protected function loadUpdates()
    {
        $this->fetchStatusBefore();
        $success = true;
        foreach (new UpdatesIterator(self::getPathToUpdates()) as $fileInfo) {
            /* @var $fileInfo \SplFileInfo */
            $updateClass = __NAMESPACE__ . '\\Updates\\' . substr($fileInfo->getFilename(), 0, 20);
            try {
                /* @var $update \Scalr\Upgrade\AbstractUpdate */
                $update = new $updateClass($fileInfo, $this->stateBefore);
                $this->updates[$update->getUuidHex()] = $update;
            } catch (\Exception $e) {
                $this->console->error("Error. Could not load update %s. %s", $fileInfo->getPathname(), $e->getMessage());
                $success = false;
            }
        }
        return $success;
    }