mirror of
https://github.com/hauke68/Magallanes.git
synced 2025-09-13 12:40:18 +02:00
New Built-In Tasks for Symfony v1 and v2.
This commit is contained in:
parent
3f0efc1a42
commit
b252555655
17
Mage/Task/BuiltIn/Symfony/ClearCache.php
Normal file
17
Mage/Task/BuiltIn/Symfony/ClearCache.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
class Mage_Task_BuiltIn_Symfony_ClearCache
|
||||||
|
extends Mage_Task_TaskAbstract
|
||||||
|
{
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'Symfony v1 - Clear Cache [built-in]';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$command = 'symfony cc';
|
||||||
|
$result = $this->_runLocalCommand($command);
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
17
Mage/Task/BuiltIn/Symfony/Migrate.php
Normal file
17
Mage/Task/BuiltIn/Symfony/Migrate.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
class Mage_Task_BuiltIn_Symfony_ClearCache
|
||||||
|
extends Mage_Task_TaskAbstract
|
||||||
|
{
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'Symfony v1 - Run Migrations [built-in]';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$command = 'symfony doctrine:migrate';
|
||||||
|
$result = $this->_runLocalCommand($command);
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
17
Mage/Task/BuiltIn/Symfony2/CacheClear.php
Normal file
17
Mage/Task/BuiltIn/Symfony2/CacheClear.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
class Mage_Task_BuiltIn_Symfony2_CacheClear
|
||||||
|
extends Mage_Task_TaskAbstract
|
||||||
|
{
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'Symfony v2 - Cache Clear [built-in]';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$command = 'app/console cache:clear';
|
||||||
|
$result = $this->_runLocalCommand($command);
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
20
Mage/Task/BuiltIn/Symfony2/CacheWarmup.php
Normal file
20
Mage/Task/BuiltIn/Symfony2/CacheWarmup.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
class Mage_Task_BuiltIn_Symfony2_CacheWarmup
|
||||||
|
extends Mage_Task_TaskAbstract
|
||||||
|
{
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'Symfony v2 - Cache Warmup [built-in]';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$command = 'app/console cache:clear';
|
||||||
|
$result = $this->_runLocalCommand($command);
|
||||||
|
|
||||||
|
$command = 'app/console cache:warmup';
|
||||||
|
$result = $result && $this->_runLocalCommand($command);
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
17
Mage/Task/BuiltIn/Symfony2/Migrate.php
Normal file
17
Mage/Task/BuiltIn/Symfony2/Migrate.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
class Mage_Task_BuiltIn_Symfony2_ClearCache
|
||||||
|
extends Mage_Task_TaskAbstract
|
||||||
|
{
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'Symfony v2 - Run Migrations [built-in]';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$command = 'app/console doctrine:migrations:migrate';
|
||||||
|
$result = $this->_runLocalCommand($command);
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user