Modify ↓
Ticket #281 (new enhancement)
Integrate SPL into Phing
| Reported by: | alexeyshockov | Owned by: | alexeyshockov |
|---|---|---|---|
| Priority: | major | Milestone: | 2.5.0 |
| Component: | phing-core | Version: | |
| Keywords: | spl | Cc: | mp@… |
Attachments
Change History
comment:2 Changed 7 months ago by mp
A good place to start could be the way FileSets are handled... there is a recurring pattern all over the place that looks like
// $fs is a FileSet
$fromDir = $fs->getDir($this->project);
$ds = $fs->getDirectoryScanner($this->project);
foreach ($ds->getIncludedFiles() as $srcFile) {
$pf = new PhingFile($fromDir, $srcFile)
...
that could just read
foreach ($pf in $fs) {
...
I don't know whether there is a need at all to access the excludedFile from the directory scanner? When it comes to processing files and directories separately (which I've seen in a few places), PhingFile also supports isFile()/isDirectory().
Note: See
TracTickets for help on using
tickets.
