/** * Returns start code for this tag. * * @return string Final code to insert in gate * @see Nexista_Builder::getCode() */ public function getCodeStart() { $path = new Nexista_PathBuilder(); $name = $this->action->getAttribute('name'); $code[] = '$test_case = ' . $path->get($name, 'flow', JOIN_DOUBLE_QUOTE) . ';'; $code[] = 'switch($test_case) {'; return implode(NX_BUILDER_LINEBREAK, $code); }
/** * Returns start code for this tag. * * @return string Final code to insert in gate * @see Nexista_Builder::getCode() */ public function getCodeStart() { $path = new Nexista_PathBuilder(); $name = $this->action->getAttribute('name'); //$code[] = 'if ('.$path->get($name, 'flow', JOIN_NONE).')'; $code[] = '$if_test = ' . $path->get($name, 'flow', JOIN_NONE) . ';'; return implode(NX_BUILDER_LINEBREAK, $code); }
/** * Returns start code for this tag. * * @return string Final code to insert in gate * @see Nexista_Builder::getCode() */ public function getCodeStart() { $path = new Nexista_PathBuilder(); $src = $path->get($this->action->getAttribute('src'), 'string', JOIN_SINGLE_QUOTE); //$this->action->getAttribute('src'); $code[] = '$xsl =& new Nexista_XslHandler();'; $code[] = '$output .= $xsl->process(' . $src . ');'; return implode(NX_BUILDER_LINEBREAK, $code); }
/** * Returns start code for this tag. * * @return string Final code to insert in gate * @see Nexista_Builder::getCode() */ public function getCodeStart() { $path = new Nexista_PathBuilder(); if ($this->action->hasAttribute('params')) { $code[] = $this->addErrorHandler("Nexista_ActionHandler::processItem('" . $this->action->getAttribute('type') . "'," . $path->get($this->action->getAttribute('params'), 'string', JOIN_DOUBLE_QUOTE) . ", true)"); } else { $code[] = $this->addErrorHandler("Nexista_ActionHandler::processItem('" . $this->action->getAttribute('type') . "', true)"); } return implode(NX_BUILDER_LINEBREAK, $code); }
/** * Returns start code for this tag. * * @return string Final code to insert in gate * @see Nexista_Builder::getCode() */ public function getCodeStart() { $path = new Nexista_PathBuilder(); // PathBuilder is currently needed here for translations // Though I'm not thrilled with how i18n is performing in that manner if (strpos($this->action->getAttribute('src'), 'http://') !== false) { $params = "'" . $this->action->getAttribute('src') . "'"; } else { $params = $path->get($this->action->getAttribute('src'), 'string', JOIN_SINGLE_QUOTE); } if ($this->action->hasAttribute('parent')) { $params .= "," . $this->action->getAttribute('parent'); } $code[] = $this->addErrorHandler('Nexista_XmlHandler::process(' . $params . ')'); return implode(NX_BUILDER_LINEBREAK, $code); }
/** * Returns start code for this tag. * * @return string Final code to insert in gate * @see Nexista_Builder::getCode() */ public function getCodeStart() { $path = new Nexista_PathBuilder(); $code[] = $this->addErrorHandler("Nexista_ParameterHandler::process('" . $this->action->getAttribute('name') . "'," . $path->get($this->action->getAttribute('value'), 'string', JOIN_SINGLE_QUOTE) . ")"); return implode(NX_BUILDER_LINEBREAK, $code); }
/** * Returns start code for this tag. * * @return string Final code to insert in gate * @see Nexista_Builder::getCode() */ public function getCodeStart() { $path = new Nexista_PathBuilder(); $code[] = 'case ' . $path->get($this->action->getAttribute('value'), 'string', JOIN_DOUBLE_QUOTE) . ':'; return implode(NX_BUILDER_LINEBREAK, $code); }