/**
  * @param string $bundle
  * @param array|null $arguments
  *
  * @return \Spryker\Shared\Kernel\BundleProxy
  */
 public function __call($bundle, array $arguments = null)
 {
     if ($this->bundleProxy === null) {
         $this->bundleProxy = $this->getBundleProxy();
     }
     return $this->bundleProxy->setBundle($bundle);
 }
Beispiel #2
0
 /**
  * @return void
  */
 public function testCallShouldThrowExceptionIfNoLocatorCanBeMatchedToCalledMethod()
 {
     $this->expectException('\\LogicException');
     $bundleProxy = new BundleProxy();
     $bundleProxy->addLocator(new LocatorWithMatcher('Foo'));
     $bundleProxy->notMatchingTest();
 }
Beispiel #3
0
 /**
  * @return \Spryker\Shared\Kernel\BundleProxy
  */
 protected function getBundleProxy()
 {
     $bundleProxy = new BundleProxy();
     if ($this->locator === null) {
         $this->locator = [new ClientLocator()];
     }
     $bundleProxy->setLocator($this->locator);
     return $bundleProxy;
 }
Beispiel #4
0
 /**
  * @return \Spryker\Shared\Kernel\BundleProxy
  */
 protected function getBundleProxy()
 {
     $bundleProxy = new BundleProxy();
     $bundleProxy->addLocator(new ClientLocator());
     return $bundleProxy;
 }