コード例 #1
0
ファイル: Widget.php プロジェクト: JeCat/framework
 public function __construct($sId = null, $sTemplateName = null, $sTitle = null, IView $aView = null)
 {
     parent::__construct();
     $this->setId($sId);
     $this->setTitle($sTitle ? $sTitle : $sId);
     $this->setTemplateName($sTemplateName);
     // 消息队列过滤器
     $this->messageQueue()->filters()->add(function ($aMsg, $aWidget) {
         if ($aMsg->poster() != $aWidget) {
             StopFilterSignal::stop();
         }
         return array($aMsg);
     }, $this);
     if ($aView) {
         $aView->addWidget($this);
     }
 }