#34397 [Opn->Csd]: __sleep and __wakeup documented badly

From: Date: Tue, 20 Sep 2005 12:50:03 +0000
Subject: #34397 [Opn->Csd]: __sleep and __wakeup documented badly
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969370229@lists.php.net to get a copy of this message
ID: 34397 Updated by: vrana@php.net Reported By: stochnagara at hotmail dot com -Status: Open +Status: Closed Bug Type: Documentation problem PHP Version: Irrelevant New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. <?php class Connection { protected $link; private $server, $username, $password, $db; public function __construct($server, $username, $password, $db) { $this->server = $server; $this->username = $username; $this->password = $password; $this->db = $db; $this->connect(); } private function connect() { $this->link = mysql_connect($this->server, $this->username, $this->password); mysql_select_db($this->db, $this->link); } public function __sleep() { mysql_close($this->link); } public function __wakeup() { $this->connect(); } } ?> Previous Comments: ------------------------------------------------------------------------ [2005-09-06 21:36:04] stochnagara at hotmail dot com Description: ------------ The magic methods __sleep and __wakeup are badly documented. They have their descriptions but their prototypes are not shown. Also there is no sample code for their usage. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34397&edit=1

« previous php.doc (#969370229) next »