/** * Loads in components from passed Dispenser_Builder instance. * * @param Dispenser_Builder * @return Dispenser_Exporter_Wrapper */ public function load(Dispenser_Builder $builder) { $components = $builder->getComponents(); foreach ($components as $component) { $this->generateComponent($component); } return $this; }
\t\t<methods> \t\t\t<method name="setSomeShit"> \t\t\t\t<arguments> \t\t\t\t\t<argument type="reference">Renderer</argument> \t\t\t\t\t<argument type="variable">test.config</argument> \t\t\t\t</arguments> \t\t\t</method> \t\t\t<method name="setSomeOtherShit"> \t\t\t\t<arguments> \t\t\t\t\t<argument type="variable">test.config</argument> \t\t\t\t</arguments> \t\t\t</method> \t\t</methods> \t\t<arguments> \t\t\t<argument>blah</argument> \t\t</arguments> \t</component> </components> XML; $xmlImporter = new Dispenser_Importer_Xml(); $xmlImporter->loadFromString($xml); $xmlBuilder = new Dispenser_Builder(); $xmlBuilder->load($xmlImporter); $xmlBuilder->setVariable("test.config", "test"); $xmlBuilder->getTest(); $arrayExporter = new Dispenser_Exporter_Array(); $arrayExporter->load($dispenser2); eval('$arr = ' . $arrayExporter->export() . ";"); $dispenser2 = new Dispenser_Builder(); $arrayLoader = new Dispenser_Importer_Array($arr); $dispenser2->load($arrayLoader);