/**
  * @param \Spryker\Shared\Kernel\ClassResolver\ClassInfo $callerClassInfo
  * @param string $key
  *
  * @return string
  */
 protected function buildMessage(ClassInfo $callerClassInfo, $key)
 {
     $message = 'Spryker Kernel Exception' . PHP_EOL;
     $message .= sprintf('Container does not contain the called "%s"', $key) . PHP_EOL;
     $message .= sprintf('You can fix this by adding the key "%s" to your "%sDependencyProvider"', $key, $callerClassInfo->getBundle());
     return $message;
 }
 /**
  * @param \Spryker\Shared\Kernel\ClassResolver\ClassInfo $callerClassInfo
  *
  * @return string
  */
 protected function buildMessage(ClassInfo $callerClassInfo)
 {
     $message = 'Spryker Kernel Exception' . PHP_EOL;
     $message .= sprintf('Can not resolve %1$sDependencyProvider for your bundle "%1$s"', $callerClassInfo->getBundle()) . PHP_EOL;
     $message .= 'You can fix this by adding the missing DependencyProvider to your bundle.' . PHP_EOL;
     $message .= sprintf('E.g. %s\\Yves\\%2$s\\%2$sDependencyProvider', Config::getInstance()->get(KernelConstants::PROJECT_NAMESPACE), $callerClassInfo->getBundle());
     $message .= PHP_EOL . new Backtrace();
     return $message;
 }
예제 #3
0
 /**
  * @param object|string $callerClass
  *
  * @return \Spryker\Client\Kernel\ClassResolver\AbstractClassResolver
  */
 public function setCallerClass($callerClass)
 {
     $this->classInfo = new ClassInfo();
     $this->classInfo->setClass($callerClass);
     return $this;
 }