Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Class.Layout.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Layout Class
8  * @author Anakeen
9  * @version $Id: Class.Layout.php,v 1.49 2009/01/14 14:48:14 eric Exp $
10  * @package FDL
11  * @subpackage CORE
12  */
13 /**
14  */
15 
16 include_once ('Class.Log.php');
17 include_once ('Class.Action.php');
18 include_once ('Class.Application.php');
19 /**
20  *
21  * @class Layout
22  * @brief Layout is a template generator
23  *
24  * Layout Class can manage three kind of datas :
25  * @par
26  * - 1) Simple tags :
27  * those tags are enclosed into brackets [] and can be replaced with any
28  * dynamic data given with the Set method.
29  * e.g : [MYDATA] => $this->Set("MYDATA","this is my text");
30  * @par
31  * - 2) Block of Data :
32  * those tags are used to manage repeated set of data (as table for instance)
33  * You can assign a table of data to a specific block.
34  * @code
35  * $table = array ( "0" => array ( "NAME" => "John",
36  * "SURNAME" => "Smith"),
37  * "1" => array ( "NAME" => "Robert",
38  * "SURNAME" => "Martin"));
39  * @endcode
40  * the block :
41  * @code [BLOCK IDENTITY]
42  * <tr><td align="left">[NAME]</td>
43  * <td align="right">[SURNAME]</td>
44  * </tr>
45  * [ENDBLOCK IDENTITY]
46  * @endcode
47  * the code :
48  * @code $lay = new Layout ("file containing the block");
49  * $lay->SetBlockData("IDENTITY",$table);
50  *
51  * $out = $lay->gen();
52  * @endcode
53  * $out :
54  * @code
55  * <tr><td align="left">John</td>
56  * <td align="right">Smith</td>
57  * </tr>
58  * <tr><td align="left">Robert</td>
59  * <td align="right">Martin</td>
60  * </tr>
61  * @endcode
62  * - 3) Call a specific script (need Core App Environment to work)
63  * tag syntax : [ZONE zonename]
64  * the zone name is linked to a specific application/function
65  * eg : [ZONE CORE:APPLIST]
66  * then the APPLIST function in the CORE Application is called
67  * this function can then use another layout etc......
68  */
69 class Layout
70 {
71  private $strip = 'N';
72  private $escapeBracket = "__BRACKET-OPEN__";
73  private $noGoZoneMapping = "__NO-GO-ZONE__";
74  private $goZoneMapping = "[ZONE ";
75  public $encoding = "";
76  /**
77  * set to true to not parse template when it is generating
78  * @var bool
79  */
80  public $noparse = false;
81  protected $corresp;
82  protected $data = null;
83  /**
84  * @var array
85  */
86  protected $rif = array();
87  /**
88  * @var array
89  */
90  protected $rkey = array();
91  /**
92  * @var array
93  */
94  protected $pkey = array();
95 
96  protected $zoneLevel = 0;
97  /**
98  * @var Action
99  */
100  public $action = null;
101  //########################################################################
102  //# Public methods
103  //#
104  //#
105 
106 
107  /**
108  * construct layout to identify template
109  *
110  *
111  * @param string $caneva file path of the template
112  * @param Action $action current action
113  * @param string $template if no $caneva found or is empty use this template.
114  */
115  public function __construct($caneva = "", $action = null, $template = "[OUT]")
116  {
117  $this->LOG = new Log("", "Layout");
118  if (($template == "[OUT]") && ($caneva != "")) $this->template = sprintf(_("Template [%s] not found") , $caneva);
119  else $this->template = $template;
120  if ($action) $this->action = & $action;
121  $this->generation = "";
122  $this->noGoZoneMapping = uniqid($this->noGoZoneMapping);
123  $this->escapeBracket = uniqid($this->escapeBracket);
124  $file = $caneva;
125  $this->file = "";
126  if ($caneva != "") {
127  if ((!file_exists($file)) && ($file[0] != '/')) {
128  $file = DEFAULT_PUBDIR . "/$file"; // try absolute
129 
130  }
131  if (file_exists($file)) {
132  $this->file = $file;
133  $this->template = file_get_contents($file);
134  }
135  }
136  }
137  /**
138  * set reference between array index and layout key
139  *
140  * use these data
141  * @code
142  * $table = array ( "0" => array ( "name" => "John",
143  "surname" => "Smith"),
144  "1" => array ( "name" => "Robert",
145  "surname" => "Martin"));
146  * @endcode
147  * with the code
148  * @code
149  * $lay = new Layout ("file containing the block");
150  $lay->setBlockCorresp("IDENTITY","MYNAME","name");
151  $lay->setBlockCorresp("IDENTITY","MYSURNAME","surname");
152  $lay->SetBlockData("IDENTITY",$table);
153  $out = $lay->gen();
154  * @endcode
155  * for template
156  * @code[BLOCK IDENTITY]
157  <tr><td align="left">[MYNAME]</td>
158  <td align="right">[MYSURNAME]</td>
159  </tr>
160  [ENDBLOCK IDENTITY]
161  * @endcode
162  * @param string $p_nom_block
163  * @param string $p_nom_modele
164  * @param string $p_nom
165  */
166  public function setBlockCorresp($p_nom_block, $p_nom_modele, $p_nom = NULL)
167  {
168  $this->corresp["$p_nom_block"]["[$p_nom_modele]"] = ($p_nom == NULL ? $p_nom_modele : "$p_nom");
169  }
170  /**
171  * set encoded data to fill a block
172  * @api set data to fill a block
173  * @param string $p_nom_block block name
174  * @param array $data data to fill the block
175  */
176  public function eSetBlockData($p_nom_block, $data = NULL)
177  {
178  if (is_array($data)) {
179  foreach ($data as & $aRow) {
180  if (is_array($aRow)) {
181  foreach ($aRow as & $aData) {
182  $aData = str_replace("[", $this->escapeBracket, htmlspecialchars($aData, ENT_QUOTES));
183  }
184  }
185  }
186  }
187  $this->setBlockData($p_nom_block, $data);
188  }
189  /**
190  * set data to fill a block
191  * @api set data to fill a block
192  * @param string $p_nom_block block name
193  * @param array $data data to fill the block
194  */
195  public function setBlockData($p_nom_block, $data = NULL)
196  {
197  $this->data["$p_nom_block"] = $data;
198  // affect the $corresp block if not
199  if (is_array($data)) {
200  reset($data);
201  $elem = current($data);
202  if (isset($elem) && is_array($elem)) {
203  foreach ($elem as $k => $v) {
204  if (!isset($this->corresp["$p_nom_block"]["[$k]"])) {
205  $this->setBlockCorresp($p_nom_block, $k);
206  }
207  }
208  }
209  }
210  }
211  /**
212  * return data set in block name
213  * @see setBlockData
214  *
215  * @param string $p_nom_block block name
216  * @return array|bool return data or false if no data are set yet
217  */
218  public function getBlockData($p_nom_block)
219  {
220  if (isset($this->data["$p_nom_block"])) return $this->data["$p_nom_block"];
221  return false;
222  }
223 
224  protected function SetBlock($name, $block)
225  {
226  if ($this->strip == 'Y') {
227  // $block = StripSlashes($block);
228  $block = str_replace("\\\"", "\"", $block);
229  }
230  $out = "";
231  $oriRif = $this->rif;
232 
233  if (isset($this->data) && isset($this->data["$name"]) && is_array($this->data["$name"])) {
234  foreach ($this->data["$name"] as $k => $v) {
235  $loc = $block;
236  if (!is_array($this->corresp["$name"])) return sprintf(_("SetBlock:error [%s]") , $name);
237  foreach ($this->corresp["$name"] as $k2 => $v2) {
238  $vv2 = (isset($v[$v2])) ? $v[$v2] : '';
239  if ((!is_object($vv2)) && (!is_array($vv2))) {
240  $loc = str_replace($k2, str_replace($this->goZoneMapping, $this->noGoZoneMapping, $vv2) , $loc);
241  }
242  }
243  $this->rif = & $v;
244  $this->ParseIf($loc);
245  $out.= $loc;
246  }
247  $this->rif = $oriRif;
248  }
249  $this->ParseBlock($out);
250  return ($out);
251  }
252 
253  protected function ParseBlock(&$out)
254  {
255  $out = preg_replace_callback('/(?m)\[BLOCK\s*([^\]]*)\](.*?)\[ENDBLOCK\s*\\1\]/s', function ($matches)
256  {
257  return $this->SetBlock($matches[1], $matches[2]);
258  }
259  , $out);
260  }
261 
262  protected function TestIf($name, $block, $not = false)
263  {
264  $out = "";
265  if (array_key_exists($name, $this->rif) || isset($this->rkey[$name])) {
266  $n = (array_key_exists($name, $this->rif)) ? $this->rif[$name] : $this->rkey[$name];
267  if ($n xor $not) {
268  if ($this->strip == 'Y') {
269  $block = str_replace("\\\"", "\"", $block);
270  }
271  $out = $block;
272  $this->ParseBlock($out);
273  $this->ParseIf($out);
274  }
275  } else {
276  if ($this->strip == 'Y') $block = str_replace("\\\"", "\"", $block);
277 
278  if ($not) $out = "[IFNOT $name]" . $block . "[ENDIF $name]";
279  else $out = "[IF $name]" . $block . "[ENDIF $name]";
280  }
281  return ($out);
282  }
283 
284  protected function ParseIf(&$out)
285  {
286  $out = preg_replace_callback('/\[IF(NOT)?\s+([^\]]*)\](.*?)\[ENDIF\s+\\2\]/smu', function ($matches)
287  {
288  return $this->TestIf($matches[2], $matches[3], $matches[1]);
289  }
290  , $out);
291  }
292 
293  protected function ParseZone(&$out)
294  {
295  $out = preg_replace_callback('/\[ZONE\s+([^:]*):([^\]]*)\]/', function ($matches)
296  {
297  return $this->execute($matches[1], $matches[2]);
298  }
299  , $out);
300  }
301 
302  protected function ParseKey(&$out)
303  {
304  if (isset($this->rkey)) {
305  $out = str_replace($this->pkey, $this->rkey, $out);
306  }
307  }
308  /**
309  * define new encoding text
310  * default is utf-8
311  * @param string $enc encoding (only 'utf-8' is allowed)
312  * @deprecated not need always utf-8
313  */
314  public function setEncoding($enc)
315  {
316  if ($enc == "utf-8") {
317  $this->encoding = $enc;
318  // bind_textdomain_codeset("what", 'UTF-8');
319 
320  }
321  }
322 
323  protected function execute($appname, $actionargn)
324  {
325  $limit = getParam('CORE_LAYOUT_EXECUTE_RECURSION_LIMIT', 0);
326  if (is_numeric($limit) && $limit > 0) {
327  $loop = $this->getRecursionCount(__CLASS__, __FUNCTION__);
328  if ($loop['count'] >= $limit) {
329  $this->printRecursionCountError(__CLASS__, __FUNCTION__, $loop['count']);
330  }
331  }
332 
333  if ($this->action == "") return ("Layout not used in a core environment");
334 
335  $this->zoneLevel++;
336  // analyse action & its args
337  $actionargn = str_replace(":", "--", $actionargn); //For buggy function parse_url in PHP 4.3.1
338  $acturl = parse_url($actionargn);
339  $actionname = $acturl["path"];
340 
341  global $ZONE_ARGS;
342  $OLD_ZONE_ARGS = $ZONE_ARGS;
343  if (isset($acturl["query"])) {
344  $acturl["query"] = str_replace("--", ":", $acturl["query"]); //For buggy function parse_url in PHP 4.3.1
345  $zargs = explode("&", $acturl["query"]);
346  foreach ($zargs as $v) {
347  if (preg_match("/([^=]*)=(.*)/", $v, $regs)) {
348  // memo zone args for next action execute
349  $ZONE_ARGS[$regs[1]] = urldecode($regs[2]);
350  }
351  }
352  }
353 
354  if ($appname != $this->action->parent->name) {
355  $appl = new Application();
356  $appl->Set($appname, $this->action->parent);
357  } else {
358  $appl = & $this->action->parent;
359  }
360 
361  if (($actionname != $this->action->name) || ($OLD_ZONE_ARGS != $ZONE_ARGS)) {
362  $act = new Action();
363  $res = '';
364  if ($act->Exists($actionname, $appl->id)) {
365 
366  $act->Set($actionname, $appl);
367  } else {
368  // it's a no-action zone (no ACL, cannot be call directly by URL)
369  $act->name = $actionname;
370 
371  $res = $act->CompleteSet($appl);
372  }
373  if ($res == "") {
374  $res = $act->execute();
375  }
376 
377  $jsRefs = $act->parent->getJsRef();
378  foreach ($jsRefs as $jsRefe) {
379  $this->action->parent->addJsRef($jsRefe);
380  }
381  $cssRefs = $act->parent->getCssRef();
382  foreach ($cssRefs as $cssRefe) {
383  $this->action->parent->addCssRef($cssRefe);
384  }
385 
386  $ZONE_ARGS = $OLD_ZONE_ARGS; // restore old zone args
387  $this->zoneLevel--;
388  return ($res);
389  } else {
390  return ("Fatal loop : $actionname is called in $actionname");
391  }
392  }
393  /**
394  * add a simple key /value in template
395  * the key will be replaced by value when [KEY] is found in template
396  * @api affect value to a key
397  * @param string $tag
398  * @param string $val
399  */
400  public function set($tag, $val)
401  {
402  $this->pkey[$tag] = "[$tag]";
403  $this->rkey[$tag] = $val;
404  }
405  public function rSet($tag, $val)
406  {
407  $this->set($tag, $val);
408  }
409  public function xSet($tag, $val)
410  {
411  $this->rSet($tag, xml_entity_encode_all($val));
412  }
413  /**
414  * set key/value pair and XML entity encode
415  * @param string $tag the key to replace
416  * @param string $val the value for the key
417  */
418  public function eSet($tag, $val)
419  {
420  $val = str_replace($this->goZoneMapping, $this->noGoZoneMapping, $val);
421  $this->set($tag, str_replace("[", $this->escapeBracket, htmlspecialchars($val, ENT_QUOTES)));
422  }
423  /**
424  * return the value set for a key
425  * @see Layout::set()
426  *
427  * @param string $tag
428  * @return string
429  */
430  function get($tag)
431  {
432  if (isset($this->rkey[$tag])) return $this->rkey[$tag];
433  return "";
434  }
435 
436  protected function ParseRef(&$out)
437  {
438  if (!$this->action) return;
439  $out = preg_replace_callback('/\[IMG:([^\|\]]+)\|([0-9]+)\]/', function ($matches)
440  {
441  global $action;
442  return $action->parent->getImageLink($matches[1], true, $matches[2]);
443  }
444  , $out);
445 
446  $out = preg_replace_callback('/\[IMG:([^\]\|]+)\]/', function ($matches)
447  {
448  global $action;
449  return $action->parent->getImageLink($matches[1]);
450  }
451  , $out);
452 
453  $out = preg_replace_callback('/\[IMGF:([^\]]*)\]/', function ($matches)
454  {
455  global $action;
456  return $action->parent->GetFilteredImageUrl($matches[1]);
457  }
458  , $out);
459  }
460 
461  protected function ParseText(&$out)
462  {
463  $out = preg_replace_callback('/\[TEXT(\([^\)]*\))?:([^\]]*)\]/', function ($matches)
464  {
465  $s = $matches[2];
466  if ($s == "") return $s;
467  if (!$matches[1]) {
468  return _($s);
469  } else {
470  return ___($s, trim($matches[1], '()'));
471  }
472  }
473  , $out);
474  }
475 
476  protected function Text($s)
477  {
478  if ($s == "") return $s;
479  return _($s);
480  }
481 
482  protected function GenJsRef()
483  {
484  $js = "";
485  $list[] = $this->action->GetParam("CORE_JSURL") . "/logmsg.js?wv=" . $this->action->GetParam("WVERSION");
486  if (!empty($this->action->parent)) $list = array_merge($list, $this->action->parent->GetJsRef());
487 
488  reset($list);
489 
490  foreach ($list as $k => $v) {
491  $js.= "\n" . sprintf('<script type="text/javascript" language="JavaScript" src="%s"></script>', $v);
492  }
493  return $js;
494  }
495  /**
496  * get js code for notification (internal usage)
497  * @param $showlog
498  * @param bool $onlylog
499  * @return string
500  */
501  public function GenJsCode($showlog, $onlylog = false)
502  {
503  $out = "";
504  if (empty($this->action->parent)) return $out;
505  if (!$onlylog) {
506 
507  $list = $this->action->parent->GetJsCode();
508  foreach ($list as $k => $v) {
509  $out.= $v . "\n";
510  }
511  }
512  if ($showlog) {
513  // Add log messages
514  $list = $this->action->parent->GetLogMsg();
515  reset($list);
516  $out.= "var logmsg=new Array();\n";
517  foreach ($list as $k => $v) {
518  if (($v[0] == '{')) $out.= "logmsg[$k]=$v;\n";
519  else $out.= "logmsg[$k]=" . json_encode($v) . ";\n";
520  }
521 
522  $out.= "if ('displayLogMsg' in window) displayLogMsg(logmsg);\n";
523  $this->action->parent->ClearLogMsg();
524  // Add warning messages
525  $list = $this->action->parent->GetWarningMsg();
526  if (count($list) > 0) {
527  $out.= "displayWarningMsg(" . json_encode(implode("\n---------\n", array_unique($list)) , JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP) . ");\n";
528  }
529  $this->action->parent->ClearWarningMsg();
530  }
531  if (!$onlylog) {
532  // Add action notification messages
533  $actcode = $actarg = array();
534  $this->action->getActionDone($actcode, $actarg);
535  if (count($actcode) > 0) {
536  $out.= "var actcode=new Array();\n";
537  $out.= "var actarg=new Array();\n";
538  foreach ($actcode as $k => $v) {
539  $out.= sprintf("actcode[%d]=%s;\n", $k, json_encode($v, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP));
540  $out.= sprintf("actarg[%d]=%s;\n", $k, json_encode($actarg[$k], JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP));
541  }
542  $out.= "sendActionNotification(actcode,actarg);\n";
543  $this->action->clearActionDone();
544  }
545  }
546  return ($out);
547  }
548 
549  protected function ParseJs(&$out)
550  {
551  $out = preg_replace_callback('/\[JS:REF\]/', function ()
552  {
553  return $this->GenJsRef();
554  }
555  , $out);
556 
557  $out = preg_replace_callback('/\[JS:CODE\]/', function ()
558  {
559  return $this->GenJsCode(true);
560  }
561  , $out);
562 
563  $out = preg_replace_callback('/\[JS:CODENLOG\]/', function ()
564  {
565  return $this->GenJsCode(false);
566  }
567  , $out);
568  }
569 
570  protected function GenCssRef($oldCompatibility = true)
571  {
572  $css = "";
573  if (empty($this->action->parent)) return "";
574  if ($oldCompatibility) {
575  $cssLink = $this->action->parent->getCssLink("css/dcp/system.css", true);
576  $css.= "<link rel=\"stylesheet\" type=\"text/css\" href=\"$cssLink\">\n";
577  }
578  $list = $this->action->parent->GetCssRef();
579  foreach ($list as $k => $v) {
580  $css.= "<link rel=\"stylesheet\" type=\"text/css\" href=\"$v\">\n";
581  }
582  return $css;
583  }
584 
585  protected function GenCssCode()
586  {
587  if (empty($this->action->parent)) return "";
588  $list = $this->action->parent->GetCssCode();
589  reset($list);
590  $out = "";
591  foreach ($list as $v) {
592  $out.= $v . "\n";
593  }
594  return ($out);
595  }
596  protected function ParseCss(&$out)
597  {
598  $out = preg_replace_callback('/\[CSS:REF\]/', function ()
599  {
600  return $this->GenCssRef();
601  }
602  , $out);
603  $out = preg_replace_callback('/\[CSS:CUSTOMREF\]/', function ()
604  {
605  return $this->GenCssRef(false);
606  }
607  , $out);
608 
609  $out = preg_replace_callback('/\[CSS:CODE\]/', function ()
610  {
611  return $this->GenCssCode();
612  }
613  , $out);
614  }
615  /**
616  * Generate text from template with data included
617  * @api generate text from template
618  * @return string the complete text
619  */
620  public function gen()
621  {
622  if ($this->noparse) return $this->template;
623  // if used in an app , set the app params
624  $out = $this->template;
625 
626  $this->rif = $this->rkey;
627  $this->ParseBlock($out);
628  // Restore rif because parseBlock can change it
629  $this->rif = $this->rkey;
630  // Application parameters conditions
631  $this->parseApplicationParameters($out, true);
632 
633  $this->ParseIf($out);
634  // Parse IMG: and LAY: tags
635  $this->ParseText($out);
636  $this->ParseKey($out);
637  // Application parameters values
638  $this->parseApplicationParameters($out, false);
639  $this->ParseRef($out);
640  $this->ParseZone($out);
641  $this->ParseJs($out);
642  $this->ParseCss($out);
643 
644  $out = str_replace(array(
645  $this->noGoZoneMapping,
646  $this->escapeBracket
647  ) , array(
648  $this->goZoneMapping,
649  "["
650  ) , $out);
651  return ($out);
652  }
653  /**
654  * Use application parameters like keys
655  * @param string $out current template
656  * @param bool $addIf if true replace key with application parameters else use conditions
657  */
658  protected function parseApplicationParameters(&$out, $addIf)
659  {
660  if (is_object($this->action) && (!empty($this->action->parent))) {
661  $keys = $pval = array();
662  $list = $this->action->parent->GetAllParam();
663  if ($addIf) {
664  foreach ($list as $k => $v) {
665  $this->rif[$k] = !empty($v);
666  }
667  } elseif ($this->zoneLevel === 0) {
668  foreach ($list as $k => $v) {
669  if ($v === null) $v = '';
670  elseif (!is_scalar($v)) $v = "notScalar";
671  $keys[] = "[$k]";
672  $pval[] = $v;
673  }
674  }
675 
676  $out = str_replace($keys, $pval, $out);
677  }
678  }
679  /**
680  * Count number of execute() calls on the stack to detect infinite recursive loops
681  * @param string $class name to track
682  * @param string $function/method name to track
683  * @return array array('count' => $callCount, 'delta' => $callDelta, 'depth' => $stackDepth)
684  */
685  protected function getRecursionCount($class, $function)
686  {
687  $count = 0;
688  $curDepth = 0;
689  $prevDepth = 0;
690  $delta = 0;
691 
692  $bt = debug_backtrace(false);
693  $btCount = count($bt);
694  for ($i = $btCount - 2; $i >= 0; $i--) {
695  $curDepth++;
696  $bClass = isset($bt[$i]['class']) ? $bt[$i]['class'] : '';
697  $bFunction = isset($bt[$i]['function']) ? $bt[$i]['function'] : '';
698  if ($class == $bClass && $function == $bFunction) {
699  $delta = $curDepth - $prevDepth;
700  $prevDepth = $curDepth;
701  $count++;
702  }
703  }
704 
705  return array(
706  'count' => $count,
707  'delta' => $delta,
708  'depth' => $curDepth
709  );
710  }
711  /**
712  * Print a recursion count error message and stop execution
713  * @param string $class name to display
714  * @param string $function/method name to display
715  * @param int $count the call count that triggered the error
716  */
717  protected function printRecursionCountError($class, $function, $count)
718  {
719  include_once ('WHAT/Lib.Prefix.php');
720 
721  $http_code = 500;
722  $http_reason = "Recursion Count Error";
723  header(sprintf("HTTP/1.1 %s %s", $http_code, $http_reason));
724 
725  print "<html><head>\n";
726  print "<title>" . htmlspecialchars($http_reason) . "</title>\n";
727  print "</head></body>\n";
728 
729  print "<h1>" . sprintf("%s %s", htmlspecialchars($http_code) , htmlspecialchars($http_reason)) . "</h1>\n";
730 
731  $message = sprintf("Infinite recursive loop in %s::%s() (call count = '%s')", $class, $function, $count);
732  print "<h2>" . htmlspecialchars($message) . "</h2>\n";
733  error_log(sprintf("%s::%s Error: %s", $class, $function, $message));
734 
735  print "</body></html>\n";
736  exit;
737  }
738 }
Layout is a template generator.
ParseRef(&$out)
global $appl
Definition: checkVault.php:9
$appname
ParseCss(&$out)
setEncoding($enc)
eSetBlockData($p_nom_block, $data=NULL)
$message
parseApplicationParameters(&$out, $addIf)
ParseJs(&$out)
getRecursionCount($class, $function)
$file
SetBlock($name, $block)
if($famId) $s
if(!function_exists('pgettext')) ___($message, $context="")
Definition: Lib.Common.php:46
xSet($tag, $val)
GenCssRef($oldCompatibility=true)
const DEFAULT_PUBDIR
Definition: Lib.Prefix.php:28
xml_entity_encode_all($s)
Definition: Lib.Util.php:608
ParseIf(&$out)
printRecursionCountError($class, $function, $count)
__construct($caneva="", $action=null, $template="[OUT]")
rSet($tag, $val)
ParseKey(&$out)
getParam($name, $def="")
must be in core or global type
Definition: Lib.Common.php:193
ParseBlock(&$out)
set($tag, $val)
eSet($tag, $val)
setBlockData($p_nom_block, $data=NULL)
print
Definition: checklist.php:49
ParseZone(&$out)
switch($command) exit
Definition: checkVault.php:46
GenJsCode($showlog, $onlylog=false)
setBlockCorresp($p_nom_block, $p_nom_modele, $p_nom=NULL)
$actionname
ParseText(&$out)
$class
Definition: updateclass.php:38
execute($appname, $actionargn)
getBlockData($p_nom_block)
TestIf($name, $block, $not=false)
← centre documentaire © anakeen