Browse Source

New Built-In Tasks for Symfony v1 and v2.

1.0
Andrés Montañez 13 years ago
parent
commit
b252555655
  1. 17
      Mage/Task/BuiltIn/Symfony/ClearCache.php
  2. 17
      Mage/Task/BuiltIn/Symfony/Migrate.php
  3. 17
      Mage/Task/BuiltIn/Symfony2/CacheClear.php
  4. 20
      Mage/Task/BuiltIn/Symfony2/CacheWarmup.php
  5. 17
      Mage/Task/BuiltIn/Symfony2/Migrate.php

17
Mage/Task/BuiltIn/Symfony/ClearCache.php

@ -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

@ -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

@ -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

@ -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

@ -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…
Cancel
Save