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.  * This file is released under the LGPL
  10.  * "GNU Lesser General Public License"
  11.  * More information can be found here:
  12.  * {@link http://www.gnu.org/copyleft/lesser.html}
  13.  *
  14.  * @author     Jordi Boggiano <[email protected]>
  15.  * @copyright  Copyright (c) 2008, Jordi Boggiano
  16.  * @license    http://www.gnu.org/copyleft/lesser.html  GNU Lesser General Public License
  17.  * @link       http://dwoo.org/
  18.  * @version    0.9.1
  19.  * @date       2008-05-30
  20.  * @package    Dwoo
  21.  */
  22. {
  23.     public function init($__funcname$__functypearray $rest=array()) {}
  24.  
  25.     public static function preProcessing(Dwoo_Compiler $compilerarray $params$prepend$append$type)
  26.     {
  27.         $params $compiler->getCompiledParams($params);
  28.         $func $params['__funcname'];
  29.         $pluginType $params['__functype'];
  30.         $params $params['*'];
  31.  
  32.         if ($pluginType Dwoo::CUSTOM_PLUGIN{
  33.             $customPlugins $compiler->getDwoo()->getCustomPlugins();
  34.             $callback $customPlugins[$func]['callback'];
  35.             if (is_array($callback)) {
  36.                 if (is_object($callback[0])) {
  37.                     $callback '$this->customPlugins[\''.$func.'\'][0]->'.$callback[1].'(';
  38.                 else {
  39.                     $callback ''.$callback[0].'::'.$callback[1].'(';
  40.                 }
  41.             else {
  42.                 $callback $callback.'(';
  43.             }
  44.         else {
  45.             $callback 'smarty_block_'.$func.'(';
  46.         }
  47.  
  48.         $paramsOut '';
  49.         foreach ($params as $i=>$p{
  50.             $paramsOut .= var_export($itrue).' => '.$p.',';
  51.         }
  52.  
  53.         $curBlock =$compiler->getCurrentBlock();
  54.         $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;
  55.  
  56.         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;
  57.     }
  58.  
  59.     public static function postProcessing(Dwoo_Compiler $compilerarray $params$prepend$append$content)
  60.     {
  61.         return $content $params['postOut'];
  62.     }
  63. }

Documentation generated on Sun, 03 Aug 2008 15:12:45 +0200 by phpDocumentor 1.4.0