Source for file smartyinterface.php

Documentation is available at smartyinterface.php

  1. <?php
  2.  
  3. /**
  4.  * Smarty compatibility layer for block plugins, this is used internally and you should not call it
  5.  *
  6.  * This software is provided 'as-is', without any express or implied warranty.
  7.  * In no event will the authors be held liable for any damages arising from the use of this software.
  8.  *
  9.  * @author     Jordi Boggiano <j.boggiano@seld.be>
  10.  * @copyright  Copyright (c) 2008, Jordi Boggiano
  11.  * @license    http://dwoo.org/LICENSE   Modified BSD License
  12.  * @link       http://dwoo.org/
  13.  * @version    1.0.0
  14.  * @date       2008-10-23
  15.  * @package    Dwoo
  16.  */
  17. {
  18.     public function init($__funcname$__functypearray $rest=array()) {}
  19.  
  20.     public static function preProcessing(Dwoo_Compiler $compilerarray $params$prepend$append$type)
  21.     {
  22.         $params $compiler->getCompiledParams($params);
  23.         $func $params['__funcname'];
  24.         $pluginType $params['__functype'];
  25.         $params $params['*'];
  26.  
  27.         if ($pluginType Dwoo::CUSTOM_PLUGIN{
  28.             $customPlugins $compiler->getDwoo()->getCustomPlugins();
  29.             $callback $customPlugins[$func]['callback'];
  30.             if (is_array($callback)) {
  31.                 if (is_object($callback[0])) {
  32.                     $callback '$this->customPlugins[\''.$func.'\'][0]->'.$callback[1].'(';
  33.                 else {
  34.                     $callback ''.$callback[0].'::'.$callback[1].'(';
  35.                 }
  36.             else {
  37.                 $callback $callback.'(';
  38.             }
  39.         else {
  40.             $callback 'smarty_block_'.$func.'(';
  41.         }
  42.  
  43.         $paramsOut '';
  44.         foreach ($params as $i=>$p{
  45.             $paramsOut .= var_export($itrue).' => '.$p.',';
  46.         }
  47.  
  48.         $curBlock =$compiler->getCurrentBlock();
  49.         $curBlock['params']['postOut'Dwoo_Compiler::PHP_OPEN.' $_block_content = ob_get_clean(); $_block_repeat=false; echo '.$callback.'$_tag_stack[count($_tag_stack)-1], $_block_content, $this, $_block_repeat); } array_pop($_tag_stack);'.Dwoo_Compiler::PHP_CLOSE;
  50.  
  51.         return Dwoo_Compiler::PHP_OPEN.$prepend.' if (!isset($_tag_stack)){ $_tag_stack = array(); } $_tag_stack[] = array('.$paramsOut.'); $_block_repeat=true; '.$callback.'$_tag_stack[count($_tag_stack)-1], null, $this, $_block_repeat); while ($_block_repeat) { ob_start();'.Dwoo_Compiler::PHP_CLOSE;
  52.     }
  53.  
  54.     public static function postProcessing(Dwoo_Compiler $compilerarray $params$prepend$append$content)
  55.     {
  56.         return $content $params['postOut'];
  57.     }
  58. }

Documentation generated on Sun, 07 Feb 2010 17:53:56 +0000 by phpDocumentor 1.4.0