Fwd: Interface OOP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux