Builds list of files for PEAR_PackageFileManager using a Phing FileSet.

Some code here is taken from PEAR_PackageFileManager_File -- getting results from flat array into the assoc array expected from getFileList().

author Greg Beaver
author Hans Lellelid
package phing.tasks.ext.pearpackage
version $Id$

 Methods

Set up the FileSet filelist generator

__construct(\PEAR_PackageFileManager $options) 

'project' and 'filesets' are the only options that this class uses.

Parameters

$options

\PEAR_PackageFileManager

Generate the <filelist></filelist> section of the package file.

getFileList() : array

This function performs the backend generation of the array containing all files in this package

Returns

arraystructure of all files to include

mystrucsort()

mystrucsort($a, $b) 

Parameters

$a

$b

Recursively add all the subdirectories of $contents to $dir without erasing anything in $dir

setDir(array $dir, array $contents) : array

Parameters

$dir

array

$contents

array

Returns

arrayprocessed $dir

Sorting functions for the file list

sortfiles(string $a, string $b) 
access private

Parameters

$a

string

$b

string

Recursively move contents of $struc into associative array

setupDirs(array $struc, array $dir, $contents) : array

The contents of $struc have many indexes like 'dir/subdir/subdir2'. This function converts them to array('dir' => array('subdir' => array('subdir2')))

Parameters

$struc

array

struc is array('dir' => array of files in dir, 'dir/subdir' => array of files in dir/subdir,...)

$dir

array

array form of 'dir/subdir/subdir2' array('dir','subdir','subdir2')

$contents

Returns

arraysame as struc but with array('dir' => array(file1,file2,'subdir' => array(file1,...)))

 Properties

 

$filesets : array
 

$project : \Project