コード例 #1
0
ファイル: Render.php プロジェクト: philip/phd
 public function attach($obj, $inf = array())
 {
     /* {{{ */
     if (!$obj instanceof Format) {
         throw new InvalidArgumentException('All formats *MUST* inherit ' . __NAMESPACE__ . '\\Format');
     }
     $obj->notify(Render::STANDALONE, true);
     return parent::attach($obj, $inf);
 }
コード例 #2
0
ファイル: Format.php プロジェクト: TazeTSchnitzel/phd
 public final function attach($obj, $inf = array())
 {
     if (!$obj instanceof $this && get_class($obj) != get_class($this)) {
         throw new \InvalidArgumentException(get_class($this) . " themes *MUST* _inherit_ " . get_class($this) . ", got " . get_class($obj));
     }
     $obj->notify(Render::STANDALONE, false);
     return parent::attach($obj, $inf);
 }