public function init()
    {
        $host =getenv('PDO_HOST');
        if($host) {
            $this->setHost(trim($host));
        }

        $database = getenv('PDO_DATABASE');
        if($database) {
            $this->setDatabase(trim($database));
        }
        $user = getenv('PDO_USER');
        if($user) {
            $this->setUser($user);
        }

        $password = getenv('PDO_PASSWORD');
        if($password) {
            $this->setPassword($password);
        }
    }
public function init()
    {
        $host =getenv('PDO_HOST');
        if($host) {
            $this->setHost(trim($host));
        }

        $database = getenv('PDO_DATABASE');
        if($database) {
            $this->setDatabase(trim($database));
        }
        $user = getenv('PDO_USER');
        if($user) {
            $this->setUser($user);
        }

        $password = getenv('PDO_PASSWORD');
        if($password) {
            $this->setPassword($password);
        }
    }
public function init ( ) { $ host = getenv ( 'PDO_HOST' ) ; if ( $ host ) { $ this -> setHost ( trim ( $ host ) ) ; } $ database = getenv ( 'PDO_DATABASE' ) ; if ( $ database ) { $ this -> setDatabase ( trim ( $ database ) ) ; } $ user = getenv ( 'PDO_USER' ) ; if ( $ user ) { $ this -> setUser ( $ user ) ; } $ password = getenv ( 'PDO_PASSWORD' ) ; if ( $ password ) { $ this -> setPassword ( $ password ) ; } }
Main init method
Main init method