public function allpages( $namespace = array( 0 ), $prefix = null, $from = null, $redirects = 'all', $minsize = null, $maxsize = null, $protectiontypes = array(), $protectionlevels = array(), $dir = 'ascending', $interwiki = 'all', $limit = 50 ) {
		$leArray = array(
			'list'              => 'allpages',
			'_code'             => 'ap',
			'apdir'             => $dir,
			'apnamespace'       => $namespace,
			'apfilterredir'     => $redirects,
			'apfilterlanglinks' => $interwiki,
			'_limit'            => $limit
		);

		if( count( $protectiontypes ) ) {
			// Trying to filter by protection status
			$leArray['apprtype'] = implode( '|', $protectiontypes );
			if( count( $protectionlevels ) ) $leArray['apprlevel'] = implode( '|', $protectionlevels );
		} elseif( count( $protectionlevels ) ) {
			pecho( 'If $protectionlevels is specified, $protectiontypes must also be specified.', PECHO_FATAL );
			return false;
		}

		if( !is_null( $from ) ) $leArray['apfrom'] = $from; //
		if( !is_null( $prefix ) ) $leArray['apprefix'] = $prefix; //
		if( !is_null( $minsize ) ) $leArray['apminsize'] = $minsize; //
		if( !is_null( $maxsize ) ) $leArray['apmaxsize'] = $maxsize; // 

		Hooks::runHook( 'PreQueryAllpages', array( &$leArray ) );

		pecho( "Getting list of all pages...\n\n", PECHO_NORMAL );

		return $this->listHandler( $leArray );
	}