View Single Post
Old 05-09-2009, 06:26 PM   #5 (permalink)
Enfernikus
The Addict
 
Enfernikus's Avatar
 
Join Date: Jun 2008
Posts: 335
Thanks: 2
Enfernikus is on a distinguished road
Default

Do not make them Children of the validation class pass the validation object to them or have the Loader class class it inside. Example.


PHP Code:

<?php

class Member
{
   private 
$validation;

     public function 
__construct()
     {
         
$this->validation Loader::LoadClass('validation');
     }
}

OR

PHP Code:
<?php

class Member
{
   private 
$validation;

     public function 
__construct(Validation $val)
     {
         
$this->validation $val;
     }
}

$validation = new Validation;
$member = new Member($validation);

Also, the logout function in the session class should be in your member handling object. Alternatively you can rename it to session_destroy_all, it seems nitpicky but it's in the effort of keeping your objects well structured.
Enfernikus is offline  
Reply With Quote
The Following User Says Thank You to Enfernikus For This Useful Post:
allworknoplay (05-09-2009)