error() public method

Writes a string to error stream.
public error ( string | array $error = null, mixed $options = ['nl' => 1] ) : integer
$error string | array The string or an array of strings to write.
$options mixed When passed an integer or boolean it is used as the number of of new lines, when passed a string it is interpreted as style to use otherwise when an array following options are available: - `'nl'` _integer|boolean_: number of new lines to add at the end. `false` to disable adding a newline. - `'style'` _string_: the style name to wrap around the output.
return integer
Exemplo n.º 1
0
 /**
  * Writes a string to error stream.
  *
  * @param string $error The string to write.
  * @param integer|string|array $options
  *        integer as the number of new lines.
  *        string as the style
  *        array as :
  *        - nl : number of new lines to add at the end
  *        - style : the style name to wrap around the
  * @return integer
  */
 public function error($error = null, $options = ['nl' => 1])
 {
     if (!empty($error)) {
         error_log($error);
     }
     return parent::error($error, $options);
 }