public function __construct() { global $_SESSION; if (session_start()) { $this->sessionId = session_id(); } parent::__construct($_SESSION); }
/** * Add a tab to this menu page * * @since 0.3 * * @param stdObject $tab Tab object */ public function add_tab($tab) { if (!$tab->get_id() || !$tab->get_title()) { return; } $this->tabs[$tab->get_id()] = $tab; $tab->menupage = $this; }
<pre> <?php error_reporting(-1); require __DIR__ . '/object/stdObject.php'; $o = new stdObject(array('foo' => 'bar')); var_dump($o->has('foo')); ?> </pre>
public function __destruct() { if (!headers_sent() && !self::$_saved) { $this->save(); } parent::__destruct(); }