Hi,

I am working on a back end OOP project with about about 18 classes of Object
but some of the Objects shear one or two functions in common, like external
login system . What is the best way to avoid a repeatable function among the
classes without using global object instance.

class a{

function ExtractRawData()
{
   global  loginObj;
   *if($loginObj;->GetLoginSession(){*
     ///process
  }
}

}

class b{

function JohnXchange()
{
   global  loginObj;
  *if($loginObj;->GetLoginSession(){*
     ///process
 }
}
}

class login(

function loginSession($pwd, $acc, $customerAcc)
{
  $this ->validate = connect to externalServerObject($pwd, $acc,
$customerAcc);
}
 *GetLoginSession()*
{
   return $this ->validate;
}
}



Andrew Williams
http//www.willandy.co.uk





-- 
Best Wishes
Andrew Williams

Reply via email to