Re: How do I call an class?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I find that politeness is always good, nevertheless using 'o senhor' to refer to Class1 is a little too much.

Now, I am not sure what your question actually is. Are you wondering about naming conventions? Your example seems to indicate so.

The most frequent is to have class names with the first letter in uppercase while variables are all lowercase with words separated by underscores or what is called camelcase, the first word all lowercase and then you use uppercase for the first letter of each word with no undescores. An object, that is, the instance of a class, is a variable, thus it follows the conventions for variables. Thus:

$my_class = new Class(); using traditional PHP conventions or
$myClass = new Class(); using camel case.

If that was not your question and you find it hard to state it in English, feel free to contact me privately, though I can answer you only in Spanish, my Portuguese being too primitive.

Satyam

----- Original Message ----- From: "Sr. Paulo Ricardo" <ricardo@xxxxxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Friday, September 08, 2006 3:14 PM
Subject:  How do I call an class?


Good morning.

How do I call an class?

It's correct?

$Class  = new Class();

or

$class = new Class();


Att,

'É um orgulho ter você como nosso cliente'

____________________________
Paulo Ricardo
Programador (Desenvolvedor)

ArgoHost.net
Hospedagem Web com Facilidade
<http://www.argohost.net/> http://www.argohost.net
Suporte Telefônico: (85) 3264-9944 / (11) 4063-4844
E-mail:  <mailto:suporte@xxxxxxxxxxxx> suporte@xxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux