Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #8227

Re: classes in PHP

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Simon <bad@example.com>
Newsgroups comp.lang.php
Subject Re: classes in PHP
Date Mon, 04 Feb 2013 09:15:36 +0200
Lines 55
Message-ID <an95goFbqvhU1@mid.individual.net> (permalink)
References <fd3565a9-3766-4224-bed5-812a0cd11d64@googlegroups.com> <c42bd135-6e8f-46e3-be37-445b423ff529@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net lgtVdgReDE1vvz+dxqdhtAOe1DXbmYW2WzNbdobKnVd0+D0vukbftIrZbBJAKhQcTH
Cancel-Lock sha1:aL72W/K8Nowt6IzAWlsYAR2zA0A=
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
In-Reply-To <c42bd135-6e8f-46e3-be37-445b423ff529@googlegroups.com>
Xref csiph.com comp.lang.php:8227

Show key headers only | View raw


On 2013/02/03 07:49 PM, Rita Ferreira wrote:

>
> class UserController
> {
> 	
> 	private $obj;
>
> 	function __construct( ){}
>
> 	public function login()
> 	{
> 		if($_SERVER["REQUEST_METHOD"] == "POST")
> 		{
> 			$obj=new config();
> 			$obj->conectar();
>                  }

...

>
> config.php
>
> <?php
>
> private $url_db;
> private $login_db;
> private $pass_db;
> private $db;
>
> class config
> {
>
> 	function __construct( )
>      {
>          session_start();
>          $url_db="localhost";
>          $login_db="root";
>          $pass_db="root";
>          $db="colmeia";
>      }
>
> private function conectar()

...

>

Further to what was said already, the function 'conectar' is private and 
cannot be accessed.

Simon


Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

classes in PHP Rita Ferreira <ritaferreira83@gmail.com> - 2013-02-03 09:04 -0800
  Re: classes in PHP "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-02-03 18:11 +0100
  Re: classes in PHP Rita Ferreira <ritaferreira83@gmail.com> - 2013-02-03 09:49 -0800
    Re: classes in PHP "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-02-03 19:39 +0100
      Re: classes in PHP Jerry Stuckle <jstucklex@attglobal.net> - 2013-02-04 00:07 -0500
      Re: classes in PHP Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-06 13:29 +0100
        Re: classes in PHP Jerry Stuckle <jstucklex@attglobal.net> - 2013-02-06 08:49 -0500
        Re: classes in PHP "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-02-07 11:57 +0100
          Re: classes in PHP Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-07 12:17 +0100
          Re: classes in PHP Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-07 12:35 +0100
          Re: classes in PHP The Natural Philosopher <tnp@invalid.invalid> - 2013-02-07 11:46 +0000
            Re: classes in PHP "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-02-07 14:46 +0100
    Re: classes in PHP Simon <bad@example.com> - 2013-02-04 09:15 +0200

csiph-web