Convenience class for reading and writing property files.
FIXME
- Add support for arrays (separated by ',')
package |
phing.system.util |
---|---|
version |
$Id: cb8e49260c93416aaf25ef9f345c26fa6d300d61 $ |
__construct(array $properties = null)
array
append(string $key, mixed $value, string $delimiter = ',')
If the property does not, it just adds it.
string
mixed
string
containsKey( $key) : boolean
boolean
get(string $prop) : mixed
This function exists to provide a hashtable-like interface for properties.
see | \Properties::getProperty() |
---|
string
The property name (key).
mixed
getProperties() : array
Mostly for performance reasons, property hashes are often preferable to passing around objects.
array
getProperty(string $prop) : mixed
This is the same as get() method.
see | \Properties::get() |
---|
string
The property name (key).
mixed
inVal(string $val) : mixed
does things like convert "true" => true
string
Trimmed value.
mixed
The new property value (may be boolean, etc.)
isEmpty() : boolean
boolean
keys() : array
Use this for foreach () {} iterations, as this is faster than looping through property values.
array
load(\PhingFile $file) : void
outVal(mixed $val) : string
does things like convert true => "true"
mixed
The property value (may be boolean, etc.)
string
propertyNames() : array
array
put(string $key, mixed $value) : mixed
This function exists to provide hashtable-lie interface for properties.
string
mixed
mixed
setProperty(string $key, mixed $value) : mixed
string
mixed
mixed
Old property value or NULL if none was set.
store(\PhingFile $file = null, string $header = null) : void
throws |
|
---|
string
Header text that will be placed (within comments) at the top of properties file.
toString() : string
Essentially this function creates a string representation of properties that is ready to write back out to a properties file. This is used by store() method.
string
properties :