protected function _getPackages( $manifest, $filter = array() )
	{
		$packageContainer = array();

		if( !isset( $manifest->pkgs ) || !is_array( $manifest->pkgs ) ) {
			throw new MW_Jsb2_Exception( 'No packages found' );
		}

		foreach( $manifest->pkgs as $package )
		{
			if( !isset( $package->name ) || !isset( $package->file ) || !is_object( $package ) ) {
				throw new MW_Jsb2_Exception( 'Invalid package content' );
			}

			if( !isset( $package->fileIncludes ) || !is_array( $package->fileIncludes ) ) {
				throw new MW_Jsb2_Exception( 'No files in package found' );
			}

			if( !in_array( $package->name, $filter ) ) {
				$packageContainer[ pathinfo( $package->file, PATHINFO_EXTENSION ) ][] = $package;
			}
		}

		return $packageContainer;
	}