| 1 | <?php |
||
| 7 | class BloomFilter |
||
| 8 | { |
||
| 9 | |||
| 10 | protected $bitField; |
||
| 11 | |||
| 12 | protected $multiHash; |
||
| 13 | |||
| 14 | public function __construct(BitField $bitField, MultiHash $multiHash) |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param string $item add item to set |
||
| 22 | */ |
||
| 23 | public function add($item) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $item |
||
| 32 | * @return bool "possibly in set" or "definitely not in set" |
||
| 33 | */ |
||
| 34 | public function contains($item) |
||
| 44 | |||
| 45 | } |
||
| 46 |