protected function mapMethodName($methodName) { if ($methodName == 'error') { return 'error!'; } else { return parent::mapMethodName($methodName); } }
protected function mapMethodName($methodName) { if ($methodName == 'ifStmt') { return 'if'; } else { return parent::mapMethodName($methodName); } }
protected function mapMethodName($method) { $map = array('plus' => '+', 'minus' => '-', 'times' => '*'); return isset($map[$method]) ? $map[$method] : parent::mapMethodName($method); }