コード例 #1
0
 /**
  * Constructs a new ezcFeedParseErrorException.
  *
  * If $uri is not null the generated message will contain it.
  *
  * @param string $uri The URI which identifies the XML document which was tried to be parsed
  * @param string $message An extra message to be included in the thrown exception text
  */
 public function __construct($uri = null, $message)
 {
     if ($uri !== null) {
         parent::__construct("Parse error while parsing feed '{$uri}': {$message}.");
     } else {
         parent::__construct("Parse error while parsing feed: {$message}.");
     }
 }
コード例 #2
0
 /**
  * Constructs a new ezcFeedUnsupportedTypeException.
  *
  * @param string $type The feed type which caused the exception
  */
 public function __construct($type)
 {
     parent::__construct("The feed type '{$type}' is not supported.");
 }
コード例 #3
0
 /**
  * Constructs a new ezcFeedRequiredMetaDataMissingException.
  *
  * @param string $attribute The attribute which caused the exception
  */
 public function __construct($attribute)
 {
     parent::__construct("There is no data for required element '{$attribute}'.");
 }
コード例 #4
0
 /**
  * Constructs a new ezcFeedUndefinedModuleException.
  *
  * @param string $module The name of the module
  */
 public function __construct($module)
 {
     parent::__construct("The module '{$module}' is not defined yet.");
 }
コード例 #5
0
 /**
  * Constructs a new ezcFeedOnlyOneValueAllowedException.
  *
  * @param string $attribute The attribute which caused the exception
  */
 public function __construct($attribute)
 {
     parent::__construct("The element '{$attribute}' cannot appear more than once.");
 }
コード例 #6
0
 /**
  * Constructs a new ezcFeedUnsupportedElementException.
  *
  * @param string $name The element name
  */
 public function __construct($name)
 {
     parent::__construct("The feed element '{$name}' is not supported.");
 }
コード例 #7
0
 /**
  * Constructs a new ezcFeedAtLeastOneItemDataRequiredException.
  *
  * @param array(string) $attributes The attributes of which at least one is required
  */
 public function __construct($attributes)
 {
     $attributes = implode(', ', $attributes);
     parent::__construct("At least one of these elements is required: {$attributes}.");
 }
コード例 #8
0
 /**
  * Constructs a new ezcFeedUnsupportedModuleException.
  *
  * @param string $module The module name
  */
 public function __construct($module)
 {
     parent::__construct("The module '{$module}' is not supported.");
 }