Streams The php_user_filter class
(PHP 5, PHP 7, PHP 8)
소개
이 클래스의 자식은 stream_filter_register()에 전달됩니다. __construct 메서드는 호출되지 않습니다. 대신 php_user_filter::onCreate()를 초기화에 사용해야 합니다.
클래스 개요
class php_user_filter {
/* Properties */
public string $filtername = "";
public mixed $params = "";
public ?resource $stream = null;
/* Methods */
public filter(
resource $in,
resource $out,
int &$consumed,
bool $closing
): int
public onClose(): void
public onCreate(): bool
}
Properties
- filtername
- stream_filter_append()에 의해 등록된 필터의 이름.
- params
- stream
목차
- php_user_filter::filter - 필터를 적용할 때 호출됨
- php_user_filter::onClose - 필터를 닫을 때 호출됨
- php_user_filter::onCreate - 필터를 생성할 때 호출됨