WP_CLI\Iterators
CSV::__construct
Метод класса: CSV{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$CSV = new CSV(); $CSV->__construct( $filename, $delimiter );
- $filename(обязательный)
- .
- $delimiter
- .
По умолчанию: ','
Код CSV::__construct() CSV:: construct WP-CLI 2.13.0-alpha
public function __construct( $filename, $delimiter = ',' ) {
$this->filename = $filename;
$this->file_pointer = fopen( $filename, 'rb' );
if ( ! $this->file_pointer ) {
WP_CLI::error( sprintf( 'Could not open file: %s', $filename ) );
}
$this->delimiter = $delimiter;
}