public function addVariable(PhpVariable $variable)
    {
        if ($this->variableExists($variable->getIdentifier())) {
            throw new Exception('A variable of the name (' . $variable->getIdentifier() . ') does already exist.');
        }

        $this->variables[$variable->getIdentifier()] = $variable;
    }
public function addVariable(PhpVariable $variable)
    {
        if ($this->variableExists($variable->getIdentifier())) {
            throw new Exception('A variable of the name (' . $variable->getIdentifier() . ') does already exist.');
        }

        $this->variables[$variable->getIdentifier()] = $variable;
    }
public function addVariable ( PhpVariable $ variable ) { if ( $ this -> variableExists ( $ variable -> getIdentifier ( ) ) ) { throw new Exception ( 'A variable of the name (' . $ variable -> getIdentifier ( ) . ') does already exist.' ) ; } $ this -> variables [ $ variable -> getIdentifier ( ) ] = $ variable ; }
Adds a variable to the class
Throws Exception if the variable does already exist

@param PhpVariable $variable The variable object to add
@access public
@throws Exception If the variable name already exists
Adds a variable to the class Throws Exception if the variable does already exist