Reply to Re: Referencing objects?

Your name:

Reply:


Posted by Schmidty on 01/13/07 01:01

Sorry about the typo, it should be '$unknown'. Thanks for the help!! :)
Schmidty


Colin McKinnon wrote:
> Schmidty wrote:
>
> > Fairly new to OOP and PHP5.
> <snip>
> >
> > Example ==========================================================
> >
> > class NAME {
> > public $name;
> > public $unknown;
> > public $value;
> >
> >
> > function __construct($value) {
> > $this->setName($this->value);
>
> no - I guess you want to assign the value in the parameter using the setName
> method...
> $this->setName($value);
> > }
> >
> > function setName($value) {
> > $this->name = $value;
>
> Yup - just like that
>
> > }
> >
> > function getName() {
> > return $this->name;
> > }
> >
> > function nameKid($unknown) {
> > $this->setName($unkown);
> erm, not sure what this is trying to (even without the typo).
>
> Looks like your nearly there.
>
> HTH
>
> C.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация