mirror of https://github.com/hauke68/Magallanes
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
661 B
31 lines
661 B
11 years ago
|
<?php
|
||
|
namespace Mage\Task\BuiltIn\Composer;
|
||
|
|
||
|
use Mage\Task\AbstractTask;
|
||
|
use Mage\Task\ErrorWithMessageException;
|
||
|
|
||
|
class GenerateAutoloadTask extends AbstractTask
|
||
|
{
|
||
|
/**
|
||
|
* Returns the Title of the Task
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getName()
|
||
|
{
|
||
|
return 'Generate autoload via Composer [built-in]';
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Runs the task
|
||
|
*
|
||
|
* @return boolean
|
||
|
* @throws ErrorWithMessageException
|
||
|
*/
|
||
|
public function run()
|
||
|
{
|
||
|
$composerPath = $this->getConfig()->general('composer_path', 'php composer.phar');
|
||
|
|
||
|
return $this->runCommand($composerPath . ' dumpautoload --optimize');
|
||
|
}
|
||
|
}
|