Variables

Public and Private Variables


  • $objectClasses

    This array is mainly used by the getRequires(), getAllows(), isAllowed(), etc. functions. You shouldn't need to access the array itself, however, it is available to you. To populate this array with the data from slapd.oc.conf, you should call the function $ldap->readConfiguration(); It is a good idea to check whether or not the array is populated already before calling readConfiguration(). This prevents the class from having to parse the configuration file more than once.

    Example:

    if (count($ldap->objectClasses) == 0)
      $ldap->readConfiguration();
    
    This array contains contains the information which gets read from the slapd.oc.conf file. It is a three dimensional array with the following format:
    $ldap->objectClasses[objectClassName][requires|allows][integer]
    
    So $ldap->objectClasses["top"]["requires"] is an array of all of the attributes required by the top objectclass. The array indices are integers from 0 to NumAttributesRequired

    $ldap->objectClasses["inetOrgPerson"]["allows"] is an array of all of the attributes allowed by the inetOrgPerson objectclass. The array indices are integers from 0 to NumAttributesRequired


  • $hostname

    This is the hostname, IP address, or list of LDAP servers that will be used.

  • $binddn

    This is the Bind DN that will be used when connecting to the LDAP server.

  • $bindpw

    This is the bind password that will be used when connecting to the LDAP server.

  • $OCconfigFilePath

    This is the path to the slapd.oc.conf file. Do not supply the path to the slapd.conf file. slapd.conf should not be readable by the webserver.
  • $error

    This string contains any error message generated by the last function call.

  • $cid

    USED INTERNALLY: This holds the Connection ID of the current LDAP connection

  • $bid

    USED INTERNALLY: This holds the Bind ID of the current LDAP binding.

  • $sr

    USED INTERNALLY: This holds the search result id of the last called search function.

  • $re

    USED INTERNALLY: This holds the result entry identifier of the current result entry.

  • $start

    USED INTERNALLY: This variable will be 0 right after a search is called. After the first call to fetch, it is set to one. The resetResult() function will reset this to 0.