YANA 4 PHP FrameworkDocs For Class ConfigFile

### Class ConfigFile

#### Description

ConfigFile

- name: configfile
- access: public

Located in /includes/class_configfile.php

    SerializeableObject
       |
       --InputStream
          |
          --SecureInputStream
             |
             --SecureFileStream
                |
                --ConfigFile

#### Direct descendents

Class | Description
--- | ---
SmlFile | Simple Markup Language Files

#### Method Summary

boolean exists ([string $key = '*'])
mixed get ([string $key = "*"])
mixed init ()
boolean insert (array $REF)
int length ([string $key = "*"])
boolean remove ([string $key = "*"])
void reset ()
boolean set (array $REF)
string toString ()

#### Methods

##### exists

boolean exists ([string $key = '*'])

test if a certain value exists

- name: configfile::exists()
- access: public

Name | Type | Description
--- | --- | ---
$key | string | (optional)

Redefinition of:

InputStream::exists()
  exists

Redefined in descendants as:

- SmlFile::exists() : exists

##### get

mixed get ([string $key = "*"])

get

- name: configfile::get()
- access: public

Name | Type | Description
--- | --- | ---
$key | string | (optional)

Redefinition of:

SecureInputStream::get()
  get

Redefined in descendants as:

- SmlFile::get() : get

##### init

mixed init ()

initialize file contents

You should always call this before anything else.

- name: configfile::init()
- access: public

Redefined in descendants as:

- SmlFile::init() : init
- StructureFile::init() : init

##### insert

boolean insert (array $REF)

insert an array into the file

This merges the current file content with the provided array. New values will replace old ones.

- name: configfile::insert()
- access: public

Name | Type | Description
--- | --- | ---
$REF | array |

Redefinition of:

SecureFileStream::insert()
  insert

Redefined in descendants as:

- SmlFile::insert() : insert

##### length

int length ([string $key = "*"])

get the number of elements

This returns how many elements can be found inside the array at position $key. If $key points to a non-existing value, or an empty array, the function returns 0.

- name: configfile::length()
- access: public

Name | Type | Description
--- | --- | ---
$key | string | (optional)

Redefinition of:

SecureFileStream::length()
  length

Redefined in descendants as:

- SmlFile::length() : length

##### remove

boolean remove ([string $key = "*"])

remove an entry from the file

- name: configfile::remove()
- access: public

Name | Type | Description
--- | --- | ---
$key | string | (optional)

Redefinition of:

SecureFileStream::remove()
  is_writeable

Redefined in descendants as:

- SmlFile::remove() : remove

##### reset

void reset ()

reset the file

Changes to the file will not be safed unless you explicitely call $configFile->write(). So if you want or need to revert your changes just call $configFile->reset() and all will be fine.

- name: configfile::reset()
- access: public

Redefinition of:

SecureInputStream::reset()
  reset

##### set

boolean set (array $REF)

set the content of the file

Replaces the file content with the provided array.

- name: configfile::set()
- access: public

Name | Type | Description
--- | --- | ---
$REF | array |

Redefined in descendants as:

- SmlFile::set() : set

##### toString

string toString ()

get a string representation

- name: configfile::toString()
- access: public

Redefinition of:

SecureInputStream::toString()
  toString

#### Inherited Methods

Inherited From SecureFileStream

> SecureFileStream::create()
> SecureFileStream::delete()
> SecureFileStream::failSafeWrite()
> SecureFileStream::insert()
> SecureFileStream::is_writeable()
> SecureFileStream::length()
> SecureFileStream::remove()
> SecureFileStream::write()

Inherited From SecureInputStream

> SecureInputStream::checksum()
> SecureInputStream::failSafeRead()
> SecureInputStream::get()
> SecureInputStream::isEmpty()
> SecureInputStream::read()
> SecureInputStream::reset()
> SecureInputStream::toString()

Inherited From InputStream

> InputStream::InputStream()
> InputStream::exists()
> InputStream::get()
> InputStream::getFilename()
> InputStream::isEmpty()
> InputStream::read()
> InputStream::resetStats()
> InputStream::toString()

Inherited From SerializeableObject

> SerializeableObject::serialize()
> SerializeableObject::toString()

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

yana author: Thomas Meyerwww.all-community.de/pub