Class pConfig

Description

pTreeNode - Generic Node for Tree Implementation

This class provides a Tree Node definition for generic tree data structure implementation

  • copyright: CopyrightŪ 2005, PontUKom Corp
  • version: 1.1 Bugs fixed in methods: add and get. Now them returns a value as expected
  • version: 1.0 First public release
  • author: Guilherme Blanco <guilhermeblanco@gmail.com>

Located in /class.pConfig.php (line 30)

pTreeNode
   |
   --pTree
      |
      --pConfig
Variable Summary
resource $filehandler
string $filename
boolean $final_update
boolean $PROTECT
boolean $SYNCHRONIZE
Method Summary
object __construct ([mixed $filename = ""], [string $separator = "/"], string $fileame)
void __destruct ()
void add (mixed $node, [mixed $value = null])
void comment (mixed $node, string $comment)
mixed get (mixed $node)
void read ([string $filename = ""])
void remove (mixed $node)
void setFinalUpdate ([boolean $value = null])
void write ([string $filename = ""])
void __set (mixed $propName, mixed $propValue)
Variables
resource $filehandler = null (line 42)
  • var: Config File Handler
  • access: protected
string $filename = null (line 36)
  • var: Configurator File Name
  • access: protected
boolean $final_update = true (line 48)
  • var: Update Config File at the end of script
  • access: private
boolean $PROTECT = true (line 60)
  • var: Protected Mode; generate Safe Browser Readable Config File
  • access: protected
boolean $SYNCHRONIZE = false (line 54)
  • var: Synchronized Mode; update Config File at each Tree change
  • access: protected

Inherited Variables

Inherited from pTree

pTree::$separator

Inherited from pTreeNode

pTreeNode::$childNodes
pTreeNode::$comment
pTreeNode::$depth
pTreeNode::$name
pTreeNode::$parentNode
pTreeNode::$value
Methods
Constructor __construct (line 71)

Constructor - Creates a Config Handler

  • return: Configurator
  • access: public
object __construct ([mixed $filename = ""], [string $separator = "/"], string $fileame)
  • string $fileame: File Name
  • string $separator: Path Char Separator

Redefinition of:
pTree::__construct()
Constructor - Generates a Tree Data Structure
Destructor __destruct (line 88)

Destructor - Updates Original Config File if Final Update is enabled [default: true]

void __destruct ()

Redefinition of:
pTreeNode::__destruct()
Destructor - Should not be called directly. This does the same as removeAllChilds method.
add (line 119)

Add - Insert OR Update Config Item with Value

  • return: Config Item Created
  • access: public
object add (mixed $node, [mixed $value = null])
  • mixed $node: Config Item Path or Object
  • mixed $value: Item Value

Redefinition of:
pTree::add()
Add - Insert OR Update Tree Node with Value
comment (line 165)

Comment - Insert a Config Item Comment

  • access: public
void comment (mixed $node, string $comment)
  • mixed $node: Config Item Name or Object
  • string $comment: Config Item Comment

Redefinition of:
pTree::comment()
Comment - Insert a Tree Node Comment
get (line 152)

Get - Retrieves Config Item Value

  • return: Config Item Value
  • access: public
mixed get (mixed $node)
  • mixed $node: Config Item Path or Object

Redefinition of:
pTree::get()
Get - Retrieves Node Value
read (line 192)

Read - Read Config File and Generate Tree Structure

  • access: public
void read ([string $filename = ""])
  • string $filename: File Name
remove (line 136)

Remove - Remove Config Item and All Sub-Childs

  • access: public
void remove (mixed $node)
  • mixed $node: Config Item Name or Object

Redefinition of:
pTree::remove()
Remove - Remove Tree Node and All Sub-Childs
setFinalUpdate (line 180)

Set Final Update - Updates Original Config File

  • access: public
void setFinalUpdate ([boolean $value = null])
  • boolean $value: Enable/Disable Original File Update at the end of Script execution
write (line 219)

Write - Write Config File

  • access: public
void write ([string $filename = ""])
  • string $filename: File Name
__set (line 101)

Set - Handler to parse property changes

void __set (mixed $propName, mixed $propValue)

Inherited Methods

Inherited From pTree

pTree::__construct()
pTree::add()
pTree::comment()
pTree::get()
pTree::getChild()
pTree::getLastName()
pTree::getRoot()
pTree::hasChilds()
pTree::hasValue()
pTree::isRoot()
pTree::remove()
pTree::toString()

Inherited From pTreeNode

pTreeNode::__construct()
pTreeNode::addChild()
pTreeNode::addComment()
pTreeNode::fromString()
pTreeNode::getAllChilds()
pTreeNode::getChildNode()
pTreeNode::getDepth()
pTreeNode::getName()
pTreeNode::getParent()
pTreeNode::getValue()
pTreeNode::parseValue()
pTreeNode::removeAllChilds()
pTreeNode::removeChild()
pTreeNode::setValue()
pTreeNode::toString()
pTreeNode::__destruct()

Documentation generated on Tue, 8 Mar 2005 11:51:59 -0300 by phpDocumentor 1.3.0RC3