/** * @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); }
/** * @return void */ public function testCallShouldThrowExceptionIfNoLocatorCanBeMatchedToCalledMethod() { $this->expectException('\\LogicException'); $bundleProxy = new BundleProxy(); $bundleProxy->addLocator(new LocatorWithMatcher('Foo')); $bundleProxy->notMatchingTest(); }
/** * @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; }
/** * @return \Spryker\Shared\Kernel\BundleProxy */ protected function getBundleProxy() { $bundleProxy = new BundleProxy(); $bundleProxy->addLocator(new ClientLocator()); return $bundleProxy; }