mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
43 lines
874 B
PHP
43 lines
874 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Phraseanet
|
|
*
|
|
* (c) 2005-2013 Alchemy
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Alchemy\Phrasea\Setup\Version\PreSchemaUpgrade;
|
|
|
|
use Alchemy\Phrasea\Application;
|
|
|
|
/**
|
|
* Collection of Doctrine schema pre-upgrades
|
|
*/
|
|
class PreSchemaUpgradeCollection
|
|
{
|
|
/** @var PreSchemaUpgradeInterface[] */
|
|
private $upgrades = array();
|
|
|
|
public function __construct()
|
|
{
|
|
$this->upgrades[] = new Upgrade39();
|
|
}
|
|
|
|
/**
|
|
* Applies all applyable upgrades
|
|
*
|
|
* @param Application $app
|
|
*/
|
|
public function apply(Application $app)
|
|
{
|
|
foreach ($this->upgrades as $upgrade) {
|
|
if ($upgrade->isApplyable($app)) {
|
|
$upgrade->apply($app['EM']);
|
|
}
|
|
}
|
|
}
|
|
}
|