Re: php and classes

From: Date: Fri, 16 Aug 2002 03:40:20 +0000
Subject: Re: php and classes
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-112905@lists.php.net to get a copy of this message
nm, now it works,, forgot the silly () thx, Gurhan :) regards patrick "Pafo" <pafo@pafo.net> skrev i meddelandet news:20020816034108.99993.qmail@pb1.pair.com... > dosent printout anything, here have a look: > http://www.ant.nu/phpclass.php > > regards > patrick > "Bogdan Stancescu" <mgv@canad.ro> skrev i meddelandet > news:3D5C655E.2020102@canad.ro... > > So what happens exactly? > > > > > > Pafo wrote: > > > i reed thru my code and i noticed that it wasent readable, like Dan said > in > > > one of my other post "xml and php". > > > so i thought, why not create afew classes to make everything look good > :) > > > i managed to make this class, but it just dosent work,, anyone got any > idea > > > why it wont work..? > > > > > > <?php > > > > > > class Relic { > > > var $RelicName; > > > var $RelicType; > > > var $RelicRealm; > > > var $RelicOwner; > > > > > > function PrintInfo() { > > > print "$this->RelicName : $this->RelicType : $this->RelicRealm : > > > $this->RelicOwner<br>"; > > > } > > > > > > function CheckForPrint() { > > > if ($this->RelicName == "" || $this->RelicType == "" || > $this->RelicRealm > > > == "" || $this->RelicOwner == "") { > > > return false; > > > } else { > > > return true; > > > } > > > } > > > > > > function Clean() { > > > $this->RelicName = ""; > > > $this->RelicType = ""; > > > $this->RelicRealm = ""; > > > $this->RelicOwner = ""; > > > } > > > > > > function SetName($name) { > > > $this->RelicName = $name; > > > } > > > > > > function SetType($type) { > > > $this->RelicType = $type; > > > } > > > > > > function SetRealm($realm) { > > > $this->RelicRealm = $realm; > > > } > > > > > > function SetOwner($owner) { > > > $this->RelicOwner = $owner; > > > } > > > > > > function DebugPrint() { > > > print $this->RelicName; > > > } > > > } > > > > > > $temp = new Relic; > > > $temp->SetName("test"); > > > $temp->DebugPrint; > > > ?> > > > > > > > > > i have tried, > > > class Relic { > > > }; <-------- > > > dosent work > > > > > > > > > regards > > > patrick > > > > > > > > > > > >

« previous php.general (#112905) next »