WP_CLI\Loggers
Execution::write
Write a string to a resource.
Метод класса: Execution{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->write( $handle, $str );
- $handle(resource) (обязательный)
- Commonly STDOUT or STDERR.
- $str(строка) (обязательный)
- Message to write.
Код Execution::write() Execution::write WP-CLI 2.13.0-alpha
protected function write( $handle, $str ) {
switch ( $handle ) {
case STDOUT:
$this->stdout .= $str;
break;
case STDERR:
$this->stderr .= $str;
break;
}
}