. */ /* */ /*************************************************************************************/ namespace Thelia\Module; use Symfony\Component\DependencyInjection\ContainerAware; abstract class BaseModule extends ContainerAware { const CLASSIC_MODULE_TYPE = 1; const DELIVERY_MODULE_TYPE = 2; const PAYMENT_MODULE_TYPE = 3; public function __construct() { } protected function activate() { } public function hasContainer() { return null === $this->container; } public function getContainer() { if ($this->hasContainer() === false) { throw new \RuntimeException("Sorry, container his not available in this context"); } return $this->container; } abstract public function install(); abstract public function destroy(); }