예제 #1
0
 /**
  * Generate CSS markup for this style's dynamic rules
  *
  * @return string
  */
 public function export()
 {
     // the markup that will be returned
     $markup = parent::export();
     // render rules
     if (count($this->rules)) {
         // get markup for each rule
         foreach ($this->rules as $rule) {
             // append output of rule export
             $markup .= '/*+++ generating style ***/' . PHP_EOL;
             $markup .= $rule->export();
             $markup .= '/*--- style generation complete! */' . PHP_EOL . PHP_EOL;
         }
     }
     // all done
     return $markup;
 }
예제 #2
0
 /**
  * Generate javascript markup for this script's dynamic code
  *
  * @return string
  */
 public function export()
 {
     // the markup that will be returned
     $code = parent::export();
     // render rules
     if (count($this->logic_stack)) {
         // begin script generation
         $code .= sprintf('/*+++ begin script: %s */', $this->token) . PHP_EOL;
         // loop all logic objects
         foreach ($this->logic_stack as $logic) {
             // append output of logic export
             $code .= $logic->export();
         }
         // end script generation
         $code .= sprintf('/*+++ end script: %s */', $this->token) . PHP_EOL . PHP_EOL;
     }
     // all done
     return $code;
 }