Ejemplo n.º 1
0
 /**
  * @param string $filePath
  * @param string $code
  */
 public function __construct($filePath, $code)
 {
     if (isset(self::$errors[$code])) {
         $msg = self::$errors[$code];
     } else {
         $msg = sprintf("Unknown error - '%s'", $code);
     }
     parent::__construct(sprintf("Failed to open file '%s'. %s.", $filePath, $msg));
 }
Ejemplo n.º 2
0
 public function __construct($zip, $code = 0, $prev = null)
 {
     parent::__construct("Failed to read entries of ZIP at {$zip}. See error code for more information.", $code, $prev);
 }
Ejemplo n.º 3
0
 /**
  * @param string $filePath
  */
 public function __construct($filePath)
 {
     parent::__construct(sprintf("Failed to close file '%s'.", $filePath));
 }
Ejemplo n.º 4
0
 /**
  * @param string $uri
  */
 public function __construct($uri)
 {
     parent::__construct(sprintf("Failed to read content from uri: '%s'.", $uri));
 }
Ejemplo n.º 5
0
 /**
  * @param string $from
  * @param string $to
  */
 public function __construct($from, $to)
 {
     $message = sprintf("Failed to copy file from '%s' to '%s'.", $from, $to);
     parent::__construct($message);
 }
 /**
  * @param string $uri
  * @param int    $content
  */
 public function __construct($uri, $content)
 {
     parent::__construct(sprintf("Failed to write content to uri: '%s'. Content:\r\n%s", $uri, $content));
 }