Server IP : 103.233.192.212 / Your IP : 52.14.154.79 Web Server : Apache/2 System : Linux sv1.inde.co.th 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 User : sumpatuan ( 1058) PHP Version : 5.5.38 Disable Function : symlink,shell_exec,exec,proc_close,proc_open,popen,system,dl,putenv,passthru,escapeshellarg,escapeshellcmd,pcntl_exec,proc_get_status,proc_nice,proc_terminate,pclose,ini_alter,virtual,openlog,ini_restore MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/sumpatuan/public_html/backup/framework/web/widgets/ |
Upload File : |
<?php /** * CClipWidget class file. * * @author Qiang Xue <qiang.xue@gmail.com> * @link http://www.yiiframework.com/ * @copyright 2008-2013 Yii Software LLC * @license http://www.yiiframework.com/license/ */ /** * CClipWidget records its content and makes it available elsewhere. * * Content rendered between its {@link init()} and {@link run()} calls are saved * as a clip in the controller. The clip is named after the widget ID. * * See {@link CBaseController::beginClip} and {@link CBaseController::endClip} * for a shortcut usage of CClipWidget. * * @author Qiang Xue <qiang.xue@gmail.com> * @package system.web.widgets * @since 1.0 */ class CClipWidget extends CWidget { /** * @var boolean whether to render the clip content in place. Defaults to false, * meaning the captured clip will not be displayed. */ public $renderClip=false; /** * Starts recording a clip. */ public function init() { ob_start(); ob_implicit_flush(false); } /** * Ends recording a clip. * This method stops output buffering and saves the rendering result as a named clip in the controller. */ public function run() { $clip=ob_get_clean(); if($this->renderClip) echo $clip; $this->getController()->getClips()->add($this->getId(),$clip); } }