Browse files

Improving the tag name to method mapping to include the new naming co…

…nvention.
  • Loading branch information...
1 parent 582cf63 commit a40b76cee811b532e9cb8173ce270ca262baf3f4 @zyxist zyxist committed Oct 12, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/Opt/Instruction/Abstract.php
View
10 lib/Opt/Instruction/Abstract.php
@@ -160,7 +160,7 @@ public function detach()
*/
public function migrateNode(Opt_Xml_Node $node)
{
- $name = '_migrate'.ucfirst($node->getName());
+ $name = '_migrate'.ucfirst(str_replace('-', '', $node->getName()));
if(method_exists($this, $name))
{
@@ -178,7 +178,7 @@ public function migrateNode(Opt_Xml_Node $node)
*/
public function processNode(Opt_Xml_Node $node)
{
- $name = '_process'.ucfirst($node->getName());
+ $name = '_process'.ucfirst(str_replace('-', '', $node->getName()));
$this->$name($node);
} // end processNode();
@@ -194,7 +194,7 @@ public function processNode(Opt_Xml_Node $node)
*/
public function postprocessNode(Opt_Xml_Node $node)
{
- $name = '_postprocess'.ucfirst($node->getName());
+ $name = '_postprocess'.ucfirst(str_replace('-', '', $node->getName()));
$this->$name($node);
} // end postprocessNode();
@@ -209,7 +209,7 @@ public function postprocessNode(Opt_Xml_Node $node)
*/
public function processAttribute(Opt_Xml_Node $node, Opt_Xml_Attribute $attr)
{
- $name = '_processAttr'.ucfirst($attr->getName());
+ $name = '_processAttr'.ucfirst(str_replace('-', '', $attr->getName()));
$this->$name($node, $attr);
} // end processAttribute();
@@ -226,7 +226,7 @@ public function processAttribute(Opt_Xml_Node $node, Opt_Xml_Attribute $attr)
*/
public function postprocessAttribute(Opt_Xml_Node $node, Opt_Xml_Attribute $attr)
{
- $name = '_postprocessAttr'.ucfirst($attr->getName());
+ $name = '_postprocessAttr'.ucfirst(str_replace('-', '', $attr->getName()));
$this->$name($node, $attr);
} // end postprocessAttribute();

0 comments on commit a40b76c

Please sign in to comment.