Dear all,
I recently started PHP OOP and I'm bit confused about best and the most
efficient methods when 'declaring a class' and 'calling function',
could somebody
explain me with following sample code, it would be great..

thanks..

class classLdap{

        $rslt = $_POST['rslt'];

        function ldapConnect($rslt){
          ....
          ......
          return $rslt;
        }// end function ldapConnect

        function ldapAdd($rslt){
          // i want to call ldapConnect($rslt) here what is the best method.

        $rslt = classLdap::ldapConnect($rslt);
         
        //or
        //(curently i'm doing this way, it's to lengthy)

         $new_classLdap = new classLdap;
         $rslt = $new_classLdap->ldapConnect($rslt);

        //or

         $rslt = $this->ldapConnect($rslt);     
        }// end function ldapAdd

}// end class  

-- 
vk.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to