Example #1
0
 /**
  * Add controller context to the root context.
  * @param Context $context
  * @throws \Exception
  */
 public function addControllerContext(Context $context)
 {
     if ($this->rootContext === null) {
         throw new \Exception('You can create controller config only after have created root context');
     }
     $this->rootContext->addContext($context);
 }