1. Go to this page and download the library: Download toshy62/ldapobjectbundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
toshy62 / ldapobjectbundle example snippets
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new OpenLdapObject\Bundle\LdapObjectBundle\OpenLdapObjectLdapObjectBundle(),
);
// ...
}
// ...
}
namespace AppBundle\Entity;
use OpenLdapObject\Entity;
use OpenLdapObject\Collection\EntityCollection;
use OpenLdapObject\Annotations as OLO;
/**
* @OLO\DN(value="ou=accounts")
* @OLO\Entity({"udlAccount"})
*/
class Account extends Entity {
/**
* @OLO\Column(type="string")
* @OLO\Index
*/
private $uid;
/**
* @OLO\Column(type="array")
*/
private $sn;
/**
* @OLO\Column(type="array")
*/
private $udlAccountDisplaySn;
/**
* @OLO\Column(type="array")
*/
private $givenName;
/**
* @OLO\Column(type="array")
*/
private $udlAccountDisplayGivenName;
/**
* @OLO\Column(type="string")
*/
private $mail;
/**
* @OLO\Column(type="string")
*/
private $supannEntiteAffectationPrincipale;
/**
* @OLO\Column(type="string")
*/
private $eduPersonPrimaryAffiliation;
/**
* @OLO\Column(type="array")
*/
private $eduPersonAffiliation;
/**
* @OLO\Column(type="array")
*/
private $supannEntiteAffectation;
/**
* @OLO\Column(type="string")
*/
private $supannCivilite;
/**
* @OLO\Column(type="array")
*/
private $memberOf;
public function getUid() {
return $this->uid;
}
public function setUid($value) {
$this->uid = $value;
return $this;
}
public function getSn() {
return $this->sn;
}
public function setSn($sn) {
$this->sn = $sn;
return $this;
}
public function addSn($value) {
$this->sn->add($value);
return $this;
}
public function removeSn($value) {
$this->sn->removeElement($value);
return $this;
}
public function getGivenName() {
return $this->givenName;
}
public function setGivenName($givenName) {
$this->givenName = $givenName;
return $this;
}
public function addGivenName($value) {
$this->givenName->add($value);
return $this;
}
public function removeGivenName($value) {
$this->givenName->removeElement($value);
return $this;
}
public function getUdlAccountDisplayGivenName() {
return $this->udlAccountDisplayGivenName;
}
public function setUdlAccountDisplayGivenName($udlAccountDisplayGivenName) {
$this->udlAccountDisplayGivenName = $udlAccountDisplayGivenName;
return $this;
}
public function addUdlAccountDisplayGivenName($value) {
$this->udlAccountDisplayGivenName->add($value);
return $this;
}
public function removeUdlAccountDisplayGivenName($value) {
$this->udlAccountDisplayGivenName->removeElement($value);
return $this;
}
public function getUdlAccountDisplaySn() {
return $this->udlAccountDisplaySn;
}
public function setUdlAccountDisplaySn($udlAccountDisplaySn) {
$this->udlAccountDisplaySn = $udlAccountDisplaySn;
return $this;
}
public function addUdlAccountDisplaySn($value) {
$this->udlAccountDisplaySn->add($value);
return $this;
}
public function removeUdlAccountDisplaySn($value) {
$this->udlAccountDisplaySn->removeElement($value);
return $this;
}
public function getMail() {
return $this->mail;
}
public function setMail($value) {
$this->mail = $value;
return $this;
}
public function getSupannEntiteAffectationPrincipale() {
return $this->supannEntiteAffectationPrincipale;
}
public function setSupannEntiteAffectationPrincipale($supannEntiteAffectationPrincipale) {
$this->supannEntiteAffectationPrincipale = $supannEntiteAffectationPrincipale;
return $this;
}
public function getEduPersonPrimaryAffiliation() {
return $this->eduPersonPrimaryAffiliation;
}
public function setEduPersonPrimaryAffiliation($eduPersonPrimaryAffiliation) {
$this->eduPersonPrimaryAffiliation = $eduPersonPrimaryAffiliation;
return $this;
}
public function getEduPersonAffiliation() {
return $this->eduPersonAffiliation;
}
public function setEduPersonAffiliation($eduPersonAffiliation) {
$this->eduPersonAffiliation = $eduPersonAffiliation;
return $this;
}
public function addEduPersonAffiliation($value) {
$this->eduPersonAffiliation->add($value);
return $this;
}
public function removeEduPersonAffiliation($value) {
$this->eduPersonAffiliation->removeElement($value);
return $this;
}
public function getSupannEntiteAffectation() {
return $this->supannEntiteAffectation;
}
public function setSupannEntiteAffectation($supannEntiteAffectation) {
$this->supannEntiteAffectation = $supannEntiteAffectation;
return $this;
}
public function addSupannEntiteAffectation($supannEntiteAffectation) {
$this->supannEntiteAffectation->add($supannEntiteAffectation);
return $this;
}
public function removeSupannEntiteAffectation($supannEntiteAffectation) {
$this->supannEntiteAffectation->removeElement($supannEntiteAffectation);
return $this;
}
public function getSupannCivilite() {
return $this->supannCivilite;
}
public function setSupannCivilite($value) {
$this->supannCivilite = $value;
return $this;
}
public function getMemberOf(){
return $this->memberOf;
}
public function setMemberOf($memberOf) {
$this->memberOf = $memberOf;
return $this;
}
public function addMemberOf($memberOf) {
$this->memberOf->add($memberOf);
return $this;
}
public function removeMemberOf($memberOf) {
$this->memberOf->removeElement($memberOf);
return $this;
}
}