protected function loadObjectFromContext($name)
 {
     if (!array_key_exists($name, $this->context)) {
         throw new ApplicationContextException('Cannot load object, not found in context: ' . $name);
     }
     $objectContext = $this->context[$name];
     $instantiator = new Instantiator($objectContext, $this);
     $newContext = $instantiator->getNewDefinition();
     if ($newContext != $objectContext) {
         $this->addObjectContext($newContext);
     }
     $objectName = $objectContext['id'];
     $pattern = array_key_exists('scope', $objectContext) ? $objectContext['scope'] : 'Singleton';
     $pClass = ucfirst($pattern . 'Pattern');
     $cp = new ObjectService($objectName);
     $cp->setPattern(new $pClass($instantiator));
     $this->addObject($cp);
 }