Exemplo n.º 1
0
 public static function addScriptCode($code, $pos = 'head', $type = 'text/javascript')
 {
     if (empty($code) || empty($pos) || empty($type)) {
         return;
     }
     if (!is_array(self::$scriptCollection)) {
         self::$scriptCollection = array();
     }
     if (!isset(self::$scriptCollection[$pos])) {
         self::$scriptCollection[$pos] = array();
     }
     self::$scriptCollection[$pos][] = array('code' => $code, 'type' => $type);
 }