7.7. Opt_Compiler_Processor class
7.7.7. configure()
7.7.6. _process()
« Previous
7.7.8. getName()
Next »

7.7.7. configure()

ConstructOptional method for implementation by the programmer
Visibilitypublic
Referencevoid configure()

Performs an initial configuration of the instruction processor and informs about the tags and attributes parsed by it. The instruction programmer should extend this method and call there Opt_Compiler_Processor::_addInstructions() and Opt_Compiler_Processor::_addAttributes():

class Opt_Instruction_Foo extends Opt_Compiler_Processor
{
    protected $_name = 'foo';
 
    public function configure()
    {
        // Configure the processor
        $this->_addInstructions('opt:foo');
        $this->_addAttributes('opt:foo');
    } // end configure();
 
    public function processNode(Opt_Xml_Node $node)
    {
        // Process the tags.
    } // end processNode();
 
    public function processAttribute(Opt_Xml_Node $node, Opt_Xml_Attribute $attr)
    {
        // Process the attributes.
    } // end processAttribute();
} // end Opt_Instruction_Foo;
7.7.7. configure()
7.7. Opt_Compiler_Processor class
« Previous
7.7.6. _process()
Next »
7.7.8. getName()