<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >php_stream_filter_register_factory</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="Streams Common API Reference" HREF="streams.common-api.html"><LINK REL="PREVIOUS" TITLE="php_stream_open_wrapper_as_file" HREF="streams.php-stream-open-wrapper-as-file.html"><LINK REL="NEXT" TITLE="php_stream_filter_unregister_factory" HREF="streams.php-stream-filter-unregister-factory.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP 手册</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="streams.php-stream-open-wrapper-as-file.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="streams.php-stream-filter-unregister-factory.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="streams.php-stream-filter-register-factory" ></A >php_stream_filter_register_factory</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN253227" ></A >php_stream_filter_register_factory -- Registers a filter factory with the Streams API</DIV ><DIV CLASS="refsect1" ><A NAME="AEN253230" ></A ><H2 >Description</H2 >int <B CLASS="methodname" >php_stream_filter_register_factory</B > ( const char * filterpattern, php_stream_filter_factory * factory )<BR ></BR ><P > Use this function to register a filter factory with the name given by <CODE CLASS="parameter" >filterpattern</CODE >. <CODE CLASS="parameter" >filterpattern</CODE > can be either a normal string name (i.e. <TT CLASS="literal" >myfilter</TT >) or a global pattern (i.e. <TT CLASS="literal" >myfilterclass.*</TT >) to allow a single filter to perform different operations depending on the exact name of the filter invoked (i.e. <TT CLASS="literal" >myfilterclass.foo</TT >, <TT CLASS="literal" >myfilterclass.bar</TT >, etc...) </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >注意: </B > Filters registered by a loadable extension must be certain to call php_stream_filter_unregister_factory() during MSHUTDOWN. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="streams.php-stream-open-wrapper-as-file.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >起始页</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="streams.php-stream-filter-unregister-factory.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >php_stream_open_wrapper_as_file</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="streams.common-api.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >php_stream_filter_unregister_factory</TD ></TR ></TABLE ></DIV ></BODY ></HTML >