Classes, interfaces and traits
StringHelper¶
String helper utility class.
This class includes some Java-like functions for parsing strings,
as well as some functions for getting qualifiers / unqualifying phing-style
classpaths. (e.g. "phing.util.StringHelper").
« More »
Timer¶
This class can be used to obtain the execution time of all of the scripts
that are executed in the process of building a page.
Example:
To be done before any scripts execute:
$Timer = new Timer;
$Timer->Start_Timer();
To be done after all scripts have executed:
$timer->Stop_Timer();
$timer->Get_Elapsed_Time(int number_of_places);
« More »
Register¶
Static class to handle a slot-listening system.
Unlike the slots/signals Qt model, this class manages something that is
more like a simple hashtable, where each slot has only one value. For that
reason "Registers" makes more sense, the reference being to CPU registers.
This could be used for anything, but it's been built for a pretty specific phing
need, and that is to allow access to dynamic values that are set by logic
that is not represented in a build file. For exampe, we need a system for getting
the current resource (file) that is being processed by a filterchain in a fileset.
Each slot corresponds to only one read-only, dynamic-value RegisterSlot object. In
a build.xml register slots are expressed using a syntax similar to variables:
<replaceregexp>
<regexp pattern="\n" replace="%{task.current_file}"/>
</replaceregexp>
The task/type must provide a supporting setter for the attribute:
<code>
function setListeningReplace(RegisterSlot $slot) {
$this->replace = $slot;
}
// in main()
if ($this->replace instanceof RegisterSlot) {
$this->regexp->setReplace($this->replace->getValue());
} else {
$this->regexp->setReplace($this->replace);
}
</code>
« More »
RegisterSlot¶
Represents a slot in the register.
« More »
Properties¶
Convenience class for reading and writing property files.
FIXME
- Add support for arrays (separated by ',')
« More »