mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-28 10:08:56 +02:00
Big refactoring. Use of Namespaces and codestyles. PSR-0, PSR-1, PSR-2.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the Magallanes package.
|
||||
*
|
||||
* (c) Andrés Montañez <andres@andresmontanez.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Mage\Command;
|
||||
|
||||
use Mage\Config;
|
||||
|
||||
/**
|
||||
* Abstract Class for a Magallanes Command
|
||||
*
|
||||
* @author Andrés Montañez <andres@andresmontanez.com>
|
||||
*/
|
||||
abstract class AbstractCommand
|
||||
{
|
||||
/**
|
||||
* Instance of the loaded Configuration.
|
||||
*
|
||||
* @var Mage\Config
|
||||
*/
|
||||
protected $config = null;
|
||||
|
||||
/**
|
||||
* Runs the Command
|
||||
* @throws Exception
|
||||
*/
|
||||
public abstract function run();
|
||||
|
||||
/**
|
||||
* Sets the Loaded Configuration.
|
||||
*
|
||||
* @param Config $config
|
||||
*/
|
||||
public function setConfig(Config $config)
|
||||
{
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Loaded Configuration.
|
||||
*
|
||||
* @return Config
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
return $this->config;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user