Esempio n. 1
0
 /**
  * Simple link to render this object optionaly
  * with the function render the parts includes
  * @return string
  */
 function render()
 {
     if (mt_rand(0, 1) == 0) {
         return bnfSubParts::render($this->parts, bnf::PART_OPTION);
     }
     return "";
 }
Esempio n. 2
0
 /**
  * Render this object and repeat the render
  * with rand condition
  * @return string
  */
 function render()
 {
     $render = "";
     while (mt_rand(0, 1) === 0) {
         $render .= bnfSubParts::render($this->parts, bnf::PART_REPETITION);
     }
     return $render;
 }
Esempio n. 3
0
 /**
  * Simple link to render this object
  * with the function render the parts includes
  * @return string
  */
 function render()
 {
     return bnfSubParts::render($this->parts, bnf::PART_SET);
 }
Esempio n. 4
0
 /**
  * Render the rule
  * @return string
  */
 function render()
 {
     $response = bnfSubParts::render($this->parts, $this->id);
     return $response;
 }