コード例 #1
0
 /**
  * RequestErrorException's constructor.
  *
  * @param string  $message
  * @param integer $statusCode
  */
 public function __construct($message, $statusCode)
 {
     parent::__construct($message);
     $this->statusCode = intval($statusCode);
 }
コード例 #2
0
 /**
  * CannotCreateContainerDirectoryException's constructor.
  *
  * @param string $directory absolute path of container directory we cannot create it
  */
 public function __construct($directory)
 {
     parent::__construct("The directory (`{$directory}`) cannot be created, permission denied.");
 }
コード例 #3
0
 /**
  * @param ConstraintViolationList $violations
  */
 public function __construct($message = "Not Modified", $code = self::NOT_MODIFIED, \Exception $previous = null, $source = null, $seek = null)
 {
     parent::__construct($message, $code, $previous, $source, $seek);
 }
コード例 #4
0
 /**
  * ServiceNotDumpableException's constructor.
  *
  * @param string      $id    id of the service which is not dumapble
  * @param string|null $class class of the service which is not dumpable (can be null)
  */
 public function __construct($id, $class = null)
 {
     parent::__construct(sprintf('You tagged %s as a dumpable service but it did not implement %s.', $id . (null !== $class ? " ({$class})" : ''), 'BackBee\\DependencyInjection\\Dumper\\DumpableServiceInterface'));
 }
コード例 #5
0
 /**
  * CannotConvertServiceStringToObjectException's constructor.
  */
 public function __construct()
 {
     parent::__construct('BackBee\\Event\\Dispatcher is missing a container to resolve parameters/services.');
 }
コード例 #6
0
 /**
  * BootstrapFileNotFoundException's constructor.
  *
  * @param array $directories [description]
  */
 public function __construct(array $directories)
 {
     parent::__construct('The file `bootstrap.yml` not found in: ' . implode(',', $directories));
 }
 /**
  * InvalidContainerDumpFilePathException's constructor.
  *
  * @param string $filepath the path to container dump file
  */
 public function __construct($filepath)
 {
     parent::__construct("{$filepath} is not readable.");
 }
コード例 #8
0
 /**
  * MissingParametersContainerDumpException's constructor.
  */
 public function __construct()
 {
     parent::__construct('The container dump array is missing parameters/services/aliases/services_dump/is_compiled key(s).');
 }
コード例 #9
0
 /**
  * InvalidServiceProxyException's constructor.
  *
  * @param string $classname the classname of the service which must implements DumpableServiceProxyInterface
  */
 public function __construct($classname)
 {
     $interface = 'BackBee\\DependencyInjection\\Dumper\\DumpableServiceProxyInterface';
     parent::__construct("{$classname} must implements {$interface} to be a valid service proxy.");
 }
コード例 #10
0
 /**
  * ContainerAlreadyExistsException's constructor.
  *
  * @param BackBee\DependencyInjection\Container $container the container created by the container builder
  *                                                         which raise this exception
  */
 public function __construct(Container $container)
 {
     parent::__construct('Current container builder already created a container.');
     $this->container = $container;
 }
コード例 #11
0
 /**
  * InvalidConfigTypeException's constructor.
  *
  * @param string $method       method of Configurator which raise this exception
  * @param string $invalid_type the invalid type provided by user
  */
 public function __construct($method, $invalid_type)
 {
     parent::__construct(sprintf('You provided invalid type (:%s) for Config\\Configurator::%s(). Only %s and %s are supported.', $invalid_type, $method, '0 (=Config\\Configurator::APPLICATION_CONFIG)', '1 (=Config\\Configurator::BUNDLE_CONFIG)'));
 }
コード例 #12
0
 public function __construct($entity, $path, $operation)
 {
     parent::__construct("You are not allowed to {$operation} `{$path}` for " . get_class($entity) . '.');
 }
コード例 #13
0
 public function __construct()
 {
     parent::__construct('To use BackBee\\Config\\Persistor::persist(), ' . 'you have to provide a list of config persistor in your application config.yml');
 }
コード例 #14
0
 /**
  * ContainerDumpInvalidFormatException's constructor.
  *
  * @param string $filepath the path to container dump file
  * @param string $type     the invalid type
  */
 public function __construct($filepath, $type)
 {
     parent::__construct("Content getted from {$filepath} is not a valid format: {$type} (array expected).");
 }
コード例 #15
0
 /**
  * MissingBootstrapParametersException's constructor.
  *
  * @param BackBee\DependencyInjection\Container $container the container created by the container builder
  *                                                         which raise this exception
  */
 public function __construct(array $missing_parameters)
 {
     parent::__construct(sprintf('Some parameters are missing in your bootstrap.yml file: %s.', implode(', ', $missing_parameters)));
 }
コード例 #16
0
 /**
  * ContainerDirectoryNotWrittableException's constructor.
  *
  * @param string $directory absolute path of container directory which is not writtable
  */
 public function __construct($directory)
 {
     parent::__construct("The directory (`{$directory}`) is not writable, permission denied.");
 }