Exemple #1
0
 /**
  * Constructs an ezcSearchDefinitionInvalidException
  *
  * @param string $type
  * @param string $class
  * @param string $location
  * @param string $extraMsg
  * @return void
  */
 public function __construct($type, $class, $location, $extraMsg = null)
 {
     if ($extraMsg) {
         $extraMsg = " ({$extraMsg})";
     }
     $locationPart = $location ? " at '{$location}'" : '';
     $message = "The {$type} definition file for '{$class}'{$locationPart} is invalid{$extraMsg}.";
     parent::__construct($message);
 }
 /**
  * Constructs an ezcSearchQueryVariableParameterException with the method $method
  * and the arguments $numProvided and $numExpected.
  *
  * @param string $method
  * @param int $numProvided
  * @param int $numExpected
  */
 public function __construct($method, $numProvided, $numExpected)
 {
     $expectedString = "{$numExpected} parameter";
     if ($numExpected > 1) {
         $expectedString .= 's';
     }
     $providedString = "none were provided";
     if ($numProvided == 1) {
         $providedString = "only one was provided";
     } else {
         if ($numProvided > 1) {
             $providedString = "only {$numProvided} were provided";
         }
     }
     $info = "The method '{$method}' expected at least {$expectedString} but {$providedString}.";
     parent::__construct($info);
 }
 /**
  * Constructs an ezcSearchFieldNotDefinedException for document type $type
  * and field $field.
  *
  * @param string $type
  * @param string $field
  */
 public function __construct($type, $field)
 {
     $message = "The document type '{$type}' does not define the field '{$field}'.";
     parent::__construct($message);
 }
Exemple #4
0
 /**
  * Constructs an ezcSearchTransactionException
  *
  * @param string $message
  */
 public function __construct($message)
 {
     parent::__construct($message);
 }
Exemple #5
0
 /**
  * Constructs an ezcSearchNetworkException
  *
  * @param string $message
  * @param mixed  $rawBody
  */
 public function __construct($message, $rawBody = null)
 {
     $this->rawBody = $rawBody;
     $message = "A network issue occurred: {$message}";
     parent::__construct($message);
 }
 /**
  * Constructs an ezcSearchIdNotFoundException for the ID $id.
  *
  * @param string $id
  */
 public function __construct($id)
 {
     $message = "There is no document with ID '{$id}'.";
     parent::__construct($message);
 }
 /**
  * Constructs an ezcSearchDefinitionNotFoundException
  *
  * @param string $type
  * @param string $class
  * @param string $location
  * @return void
  */
 public function __construct($type, $class, $location)
 {
     $message = "Could not find the {$type} definition file for '{$class}' at '{$location}'.";
     parent::__construct($message);
 }
 /**
  * Constructs an ezcSearchDoesNotProvideDefinitionException for document type $type
  *
  * @param string $type
  * @return void
  */
 public function __construct($type)
 {
     $message = "The class '{$type}' does not implement the ezcSearchDefinitionProvider interface.";
     parent::__construct($message);
 }
 /**
  * Constructs an ezcSearchIncompleteStateException for field $field.
  *
  * @param string $field
  */
 public function __construct($field)
 {
     $message = "The getState() method did not return any value for the field '{$field}'.";
     parent::__construct($message);
 }
 /**
  * Constructs an ezcSearchCanNotConnectException for type $type at location $location
  *
  * @param string $type
  * @param string $location
  * @return void
  */
 public function __construct($type, $location)
 {
     $message = "Could not connect to '{$type}' at '{$location}'.";
     parent::__construct($message);
 }