Doctrine\OXM\Marshaller\MarshallerException::couldNotOpenStream PHP Метод

couldNotOpenStream() публичный статический Метод

public static couldNotOpenStream ( $streamUri )
    public static function couldNotOpenStream($streamUri)
    {
        return new self("The XMLReader could not open output stream at '{$streamUri}'");
    }

Usage Example

Пример #1
0
 /**
  * @param string $streamUri
  * @return object
  */
 public function unmarshalFromStream($streamUri)
 {
     $reader = new XMLReader();
     if (!$reader->open($streamUri)) {
         throw MarshallerException::couldNotOpenStream($streamUri);
     }
     // Position at first detected element
     while ($reader->read() && $reader->nodeType !== XMLReader::ELEMENT) {
     }
     $mappedObject = $this->doUnmarshal($reader);
     $reader->close();
     return $mappedObject;
 }