. */ /* */ /*************************************************************************************/ namespace Thelia\Module; use Symfony\Component\DependencyInjection\ContainerAware; abstract class BaseModule extends ContainerAware { 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(); }