[ Index ] |
|
Code source de Symfony 1.0.0 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 270 lignes (8 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
Properties:: (15 méthodes):
load()
parse()
inVal()
outVal()
toString()
store()
getProperties()
getProperty()
get()
setProperty()
put()
propertyNames()
containsKey()
keys()
isEmpty()
Classe: Properties - X-Ref
Convenience class for reading and writing property files.load(PhingFile $file) X-Ref |
Load properties from a file. param: PhingFile $file return: void |
parse($filePath) X-Ref |
Replaces parse_ini_file() or better_parse_ini_file(). Saves a step since we don't have to parse and then check return value before throwing an error or setting class properties. param: string $filePath param: boolean $processSections Whether to honor [SectionName] sections in INI file. return: array Properties loaded from file (no prop replacements done yet). |
inVal($val) X-Ref |
Process values when being read in from properties file. does things like convert "true" => true param: string $val Trimmed value. return: mixed The new property value (may be boolean, etc.) |
outVal($val) X-Ref |
Process values when being written out to properties file. does things like convert true => "true" param: mixed $val The property value (may be boolean, etc.) return: string |
toString() X-Ref |
Create string representation that can be written to file and would be loadable using load() method. 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. return: string |
store(PhingFile $file, $header = null) X-Ref |
Stores current properties to specified file. param: PhingFile $file File to create/overwrite with properties. param: string $header Header text that will be placed (within comments) at the top of properties file. return: void |
getProperties() X-Ref |
Returns copy of internal properties hash. Mostly for performance reasons, property hashes are often preferable to passing around objects. return: array |
getProperty($prop) X-Ref |
Get value for specified property. This is the same as get() method. param: string $prop The property name (key). return: mixed |
get($prop) X-Ref |
Get value for specified property. This function exists to provide a hashtable-like interface for properties. param: string $prop The property name (key). return: mixed |
setProperty($key, $value) X-Ref |
Set the value for a property. param: string $key param: mixed $value return: mixed Old property value or NULL if none was set. |
put($key, $value) X-Ref |
Set the value for a property. This function exists to provide hashtable-lie interface for properties. param: string $key param: mixed $value |
propertyNames() X-Ref |
Same as keys() function, returns an array of property names. return: array |
containsKey($key) X-Ref |
Whether loaded properties array contains specified property name. return: boolean |
keys() X-Ref |
Returns properties keys. Use this for foreach() {} iterations, as this is faster than looping through property values. return: array |
isEmpty() X-Ref |
Whether properties list is empty. return: boolean |
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |