/**
  * Get a service called `$name` throwing an error by default if it does not exist yet and can not be created
  *
  * @param   string  $name
  * @param   array   $arguments
  * @param   int     $failure
  * @return  mixed
  * @throws  \ErrorException
  */
 public function getService($name, array $arguments = array(), $failure = self::FAIL_WITH_ERROR)
 {
     if ($this->hasService($name)) {
         return $this->_services->offsetGet($name);
     } elseif ($this->hasProvider($name)) {
         $this->_constructService($name, $arguments);
         if ($this->hasService($name)) {
             return $this->_services->offsetGet($name);
         }
     }
     if ($failure & self::FAIL_WITH_ERROR) {
         throw new ErrorException(sprintf('Service "%s" not known or cannot be created!', $name));
     }
     return null;
 }