42 parent::__construct(
$sink );
64 if ( $param[0] ==
'!' ) {
66 $param = substr( $param, 1 );
69 foreach ( explode(
',', $param ) as $key ) {
71 if ( isset( $constants[$key] ) ) {
72 $ns = $constants[$key];
73 $this->namespaces[$ns] =
true;
74 } elseif ( is_numeric( $key ) ) {
76 $this->namespaces[$ns] =
true;
78 throw new MWException(
"Unrecognized namespace key '$key'\n" );
87 protected function pass( $page ) {
88 $match = isset( $this->namespaces[$page->page_namespace] );
89 return $this->invert xor $match;