Exemple #1
0
 /**
  * @inheritdoc
  */
 protected function assertValidComponent($path)
 {
     parent::assertValidComponent($path);
     if (!mb_detect_encoding($path, 'US-ASCII', true) || false === strpos($path, ',') || false !== strpos($path, '\\n')) {
         throw new InvalidArgumentException(sprintf('The submitted path `%s` is invalid according to RFC2937', $path));
     }
 }
Exemple #2
0
 /**
  * new instance
  *
  * @param string $path the component value
  */
 public function __construct($path = '')
 {
     parent::__construct($this->validateString($path));
 }