1 | <?php |
||
35 | class PropertyStreamFilter extends \php_user_filter |
||
36 | { |
||
37 | |||
38 | /** |
||
39 | * The unique filter name. |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | const NAME = 'appserver-io.properties.filter.property-stream-filter'; |
||
44 | |||
45 | /** |
||
46 | * The filter parameters. |
||
47 | * |
||
48 | * @var \AppserverIo\Properties\StreamFilterParams |
||
49 | */ |
||
50 | public $params; |
||
51 | |||
52 | /** |
||
53 | * Returns the params. |
||
54 | * |
||
55 | * @return \AppserverIo\Properties\StreamFilterParams The params |
||
56 | */ |
||
57 | 2 | public function getParams() |
|
61 | |||
62 | /** |
||
63 | * This method is called whenever data is read from or written to the attached |
||
64 | * stream (such as with fread() or fwrite()). |
||
65 | * |
||
66 | * @param resource $in A resource pointing to a bucket brigade which contains one or more bucket objects containing data to be filtered |
||
67 | * @param resource $out A resource pointing to a second bucket brigade into which your modified buckets should be placed |
||
68 | * @param integer $consumed Should be incremented by the length of the data which your filter reads in and alters |
||
69 | * @param boolean $closing If the stream is in the process of closing, the closing parameter will be set to TRUE |
||
70 | * |
||
71 | * @return integer Whether the filter succeeded or not |
||
72 | * @see php_user_filter::filter() |
||
73 | */ |
||
74 | 2 | public function filter($in, $out, &$consumed, $closing) |
|
105 | } |
||
106 |