This commit is contained in:
Manuel Raynaud
2013-09-11 08:27:40 +02:00
parent 990ab0e094
commit 70d93d1daa
155 changed files with 541 additions and 809 deletions

View File

@@ -46,9 +46,10 @@ abstract class BaseModule extends ContainerAware
public function getContainer()
{
if($this->hasContainer() === false) {
if ($this->hasContainer() === false) {
throw new \RuntimeException("Sorry, container his not available in this context");
}
return $this->container;
}

View File

@@ -23,15 +23,14 @@
namespace Thelia\Module;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
interface BaseModuleInterface {
interface BaseModuleInterface
{
public function setRequest(Request $request);
public function getRequest();
public function setDispatcher(EventDispatcherInterface $dispatcher);
public function getDispatcher();
}
}

View File

@@ -23,9 +23,8 @@
namespace Thelia\Module;
interface DeliveryModuleInterface extends BaseModuleInterface {
interface DeliveryModuleInterface extends BaseModuleInterface
{
/**
*
* calculate and return delivery price
@@ -33,4 +32,4 @@ interface DeliveryModuleInterface extends BaseModuleInterface {
* @return mixed
*/
public function calculate($country = null);
}
}