parent root
PHP: Yaf_Application::__sleep - Manual

Yaf_Application::__sleep

(Yaf >=1.0.0)

Yaf_Application::__sleepYaf_Application can not be serialized

Description

private Yaf_Application::__sleep ( void ) : void

Parameters

This function has no parameters.

Return Values

add a noteadd a note

User Contributed Notes 1 note

up
0
akbarishahin at gmail dot com
8 months ago
class Connection
{
    protected $link;
    private $dsn, $username, $password;
   
    public function __construct($dsn, $username, $password)
    {
        $this->dsn = $dsn;
        $this->username = $username;
        $this->password = $password;
        $this->connect();
    }
   
    private function connect()
    {
        $this->link = new PDO($this->dsn, $this->username, $this->password);
    }
   
    public function __sleep()
    {
        return array('dsn', 'username', 'password');
    }
   
   
}
To Top
parent root