/**
  * Constructs a new ezcTreeInvalidXmlFormatException.
  *
  * @param string $xmlFile
  * @param array $errors
  */
 public function __construct($xmlFile, $errors)
 {
     $message = '';
     foreach ($errors as $error) {
         $message .= sprintf("%s:%d:%d: %s\n", $error->file, $error->line, $error->column, trim($error->message));
     }
     parent::__construct("The XML file '{$xmlFile}' does not validate according to the expected schema:\n" . $message);
 }
Beispiel #2
0
 /**
  * Constructs a new ezcTreeInvalidXmlException.
  *
  * @param string $xmlFile
  * @param array $errors
  */
 public function __construct($xmlFile, array $errors)
 {
     $message = '';
     foreach ($errors as $error) {
         $message .= sprintf("%s:%d:%d: %s\n", $error->file, $error->line, $error->column, trim($error->message));
     }
     parent::__construct("The XML file '{$xmlFile}' is not well-formed:\n" . $message);
 }
Beispiel #3
0
 /**
  * Constructs a new ezcTreeDataStoreMissingDataException.
  *
  * @param string $nodeId
  */
 public function __construct($nodeId)
 {
     parent::__construct("The data store does not have data stored for the node with ID '{$nodeId}'.");
 }
 /**
  * Constructs a new ezcTreeIdsDoNotMatchException.
  *
  * @param string $expectedId
  * @param string $actualId
  */
 public function __construct($expectedId, $actualId)
 {
     parent::__construct("You cannot add the node with node ID '{$expectedId}' to the list with key '{$actualId}'. The key needs to match the node ID.");
 }
Beispiel #5
0
 /**
  * Constructs a new ezcTreeUnknownIdException for the ID $nodeId.
  *
  * @param string $nodeId
  */
 public function __construct($nodeId)
 {
     parent::__construct("The node with ID '{$nodeId}' could not be found.");
 }
Beispiel #6
0
 /**
  * Constructs a new ezcTreeInvalidIdException for the ID $nodeId.
  *
  * @param string $nodeId
  * @param string $invalidChar
  */
 public function __construct($nodeId, $invalidChar)
 {
     parent::__construct("The node ID '{$nodeId}' contains the invalid character '{$invalidChar}'.");
 }
Beispiel #7
0
 /**
  * Constructs a new ezcTreeInvalidClassException.
  *
  * @param string $expected
  * @param string $actual
  */
 public function __construct($expected, $actual)
 {
     parent::__construct("An object of class '{$expected}' is used, but an object of class '{$actual}' is expected.");
 }
 /**
  * Constructs a new ezcTreeTransactionNotStartedException.
  */
 public function __construct()
 {
     parent::__construct("A transaction is not active.");
 }
 /**
  * Constructs a new ezcTreeTransactionAlreadyStartedException.
  */
 public function __construct()
 {
     parent::__construct("A transaction has already been started.");
 }
Beispiel #10
0
 /**
  * Constructs a new ezcTreeDbInvalidSchemaException
  *
  * @param string $operation
  * @param string $message
  */
 public function __construct($operation, $message)
 {
     parent::__construct("While {$operation}, an incompatible schema was found: {$message}.");
 }