[ Index ] |
|
Code source de Flux CMS 1.5 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 344 lignes (11 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 1 fichier inc/PEAR.php |
Config:: (8 méthodes):
Config()
getValues()
getBlocks()
setValue()
getValue()
parseInput()
writeInput()
array_merge_clobber()
Config($storage_driver,$storage_options = "") X-Ref |
Constructor requires the type of the data container, if the container needs special parameters during creation, set them with $storage_options param: string $storage_driver type of container param: string $storage_options parameter for container constructor |
getValues( $block = "/") X-Ref |
returns all key-value-pairs of the given block If the block not exists, a PEAR_Error will returned, else a hash: $array["key"] = value param: string $block block path return: array returns a hash containing all values, but a PEAR_Error if fails |
getBlocks( $block = "/") X-Ref |
returns all blocks of the given block If the block not exists, a PEAR_Error will returned, else a array containing all child blocks param: string $block block path return: array returns a array containing all values, or a PEAR_Error, if fails |
setValue( $block = "/", $key, $value = "") X-Ref |
sets the value of the key of the given block If the block or the key not exists, both will be created. The value will be returned. param: string $block block path param: string $key key to set param: string $value value for the key return: mixed type depends on $value |
getValue( $block = "/", $key, $default = "") X-Ref |
return the value of the key of the given block If the block or the key not exists, both will be created and sets on the default. The value or if not exists the default will be returned. param: string $block block path param: string $key key to set param: string $default default value for the key return: mixed type depends of the value |
parseInput($files ,$feature = Null ) X-Ref |
parses the input of the given data source The format and required content of $datasrc depends of the implementation. If the implemention requires additional data, for example a comment char, it have to deliver in a hash as second argument. param: string $files Name of the datasource to parse param: array $feature Contains a hash of features depending on the implentation return: mixed returns a PEAR_ERROR, if error occurs |
writeInput( $datasrc = "", $preserve = True ) X-Ref |
writes the data to the given data source or if not given to the datasource of parseInput If $datasrc was a array, the last file will used. See parseInput for $datasrc. If the second argument $preserve is true, the implementation should try to preserve the original format and data of the source except changed or added values. This mean to preserve for example comments in files or so. param: string $datasrc Name of the datasource to parse param: boolean $preserve preserving behavior return: mixed returns PEAR_Error, if fails |
array_merge_clobber($a1,$a2) X-Ref |
There seemed to be no built in function that would merge two arrays recursively and clobber any existing key/value pairs. Array_Merge() is not recursive, and array_merge_recursive seemed to give unsatisfactory results... it would append duplicate key/values. So here's a cross between array_merge and array_merge_recursive param: array first array to be merged param: array second array to be merged return: array merged array |
Généré le : Wed Nov 21 13:08:55 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |