>> YANA 4 PHP Framework >> Docs for page config.php

/includes/config.php

Description

Handling of Config- and SML-Files

  • licence: http://creativecommons.org/licenses/by-nc-sa/2.5/

Functions

getConfigFile
void getConfigFile (array|string $input, [mixed $mode = CASE_UPPER], int $mode )

Read a config file and returns it contents

The argument $input can wether be a filename or a numeric array of strings created by file($filename).

The argument $mode can be used to decide how keys should be treated.

Valid values for $mode are:

  • CASE_UPPER upper-case all keys
  • CASE_LOWER lower-case all keys
  • CASE_MIXED leave keys in mixed case

  • see: makeconfig()
  • see: importconfigfile()
  • name: getconfigfile()
Name Type Description
$input array|string
$mode int
importConfigFile
void importConfigFile (string $filename, [mixed $mode = CASE_UPPER], int $mode )

Read a config file and copy its contents to the global scope

The argument $mode can be used to decide how keys should be treated.

Valid values for $mode are:

  • CASE_UPPER upper-case all keys
  • CASE_LOWER lower-case all keys
  • CASE_MIXED leave keys in mixed case

  • see: makeconfig()
  • see: getconfigfile()
  • name: importconfigfile()
Name Type Description
$filename string
$mode int
makeConfig
void makeConfig (mixed $data, [mixed $name = null], [mixed $mode = CASE_UPPER], [mixed $indent = 0], string $filename, int $mode )

Create a config file from scalar variable or array data.

The argument $name can be used to specify the name of the root node. If $name is omitted, no root node is created.

The argument $mode can be used to decide how keys should be treated.

Note that any tags from string inputs will be stripped.

Valid values for $mode are:

  • CASE_UPPER upper-case all keys
  • CASE_LOWER lower-case all keys
  • CASE_MIXED leave keys in mixed case

  • see: importconfigfile()
  • see: getconfigfile()
  • name: makeconfig()
Name Type Description
$filename string
$mode int

Documentation generated on Sat, 16 Sep 2006 17:06:16 +0200 by phpDocumentor 1.3.0RC4

yana author: Thomas MeyerHomepage: www.all-community.de/pub