05-09-2009, 06:26 PM
|
#5 (permalink)
|
|
The Addict
Join Date: Jun 2008
Posts: 335
Thanks: 2
|
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.
|
|
|
|