Loading src/UnicaenLdap/Entity/Entity.php +2 −2 Changes for src/UnicaenLdap/Entity/Entity.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ abstract class Entity */ public function getId() { $key = self::getNodeParams($this->type)[0]; list($key) = self::getNodeParams($this->type); return $this->get($key); } Loading @@ -141,7 +141,7 @@ abstract class Entity */ public function getKey() { return self::getNodeParams($this->type)[0]; return reset(self::getNodeParams($this->type)); } /** Loading src/UnicaenLdap/Service/Service.php +9 −9 Changes for src/UnicaenLdap/Service/Service.php: 9 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function getList( $orderBy=null, $limit=self::DEFAULT_LIMIT, $offset=self::DEFAULT_OFFSET ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); return $this->search( "($key=*)", $orderBy, $limit, $offset ); } Loading @@ -161,7 +161,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function search( $filter, $orderBy=null, $limit=self::DEFAULT_LIMIT, $offset=self::DEFAULT_OFFSET ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); if ($limit < 0) $limit = 3999999999; // Limite maximum à 4 milliard... if ($offset < 0) $offset = 0; // Moins de zéro = impossible Loading @@ -186,7 +186,7 @@ abstract class Service implements ServiceManagerAwareInterface $i = 0; ErrorHandler::start(E_WARNING); for ($entry=ldap_first_entry($resource,$search); $entry; $entry=ldap_next_entry($resource,$entry)) { $value = ldap_get_values_len($resource,$entry,$key)[0]; list($value) = ldap_get_values_len($resource,$entry,$key); if (null !== $value){ $result[] = $value; $i++; Loading Loading @@ -233,7 +233,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function searchAttributes( $filter, array $attributes, $orderBy=null, $limit=self::DEFAULT_LIMIT, $offset=self::DEFAULT_OFFSET ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); if ($limit < 0) $limit = 3999999999; // Limite maximum à 4 milliard... if ($offset < 0) $offset = 0; // Moins de zéro = impossible Loading @@ -259,7 +259,7 @@ abstract class Service implements ServiceManagerAwareInterface $i = 0; ErrorHandler::start(E_WARNING); for ($entry=ldap_first_entry($resource,$search); $entry; $entry=ldap_next_entry($resource,$entry)) { $id = ldap_get_values_len($resource,$entry,$key)[0]; list($id) = ldap_get_values_len($resource,$entry,$key); $data = array(); foreach( $attributes as $attribute ){ $attrValue = ldap_get_values_len($resource,$entry,$attribute); Loading Loading @@ -378,7 +378,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function get( $id ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); return $this->getBy( $id, $key ); } Loading @@ -399,7 +399,7 @@ abstract class Service implements ServiceManagerAwareInterface $value = current($value); } $classname = Entity::getNodeParams($this->type)[1]; list($tmp, $classname) = Entity::getNodeParams($this->type); list( $resource, $search ) = $this->__searchBegin( Filter::equals($by, $value), $this->ou, array('*','+') ); $count = ldap_count_entries($resource, $search); switch( $count ){ Loading Loading @@ -428,7 +428,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function getAll( $ids, $orderBy=null ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); return $this->getAllBy($ids, $key, $orderBy); } Loading Loading @@ -472,7 +472,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function exists( $id ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); return $this->existsBy($id, $key); } Loading Loading
src/UnicaenLdap/Entity/Entity.php +2 −2 Changes for src/UnicaenLdap/Entity/Entity.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ abstract class Entity */ public function getId() { $key = self::getNodeParams($this->type)[0]; list($key) = self::getNodeParams($this->type); return $this->get($key); } Loading @@ -141,7 +141,7 @@ abstract class Entity */ public function getKey() { return self::getNodeParams($this->type)[0]; return reset(self::getNodeParams($this->type)); } /** Loading
src/UnicaenLdap/Service/Service.php +9 −9 Changes for src/UnicaenLdap/Service/Service.php: 9 added lines, 9 removed lines. Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function getList( $orderBy=null, $limit=self::DEFAULT_LIMIT, $offset=self::DEFAULT_OFFSET ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); return $this->search( "($key=*)", $orderBy, $limit, $offset ); } Loading @@ -161,7 +161,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function search( $filter, $orderBy=null, $limit=self::DEFAULT_LIMIT, $offset=self::DEFAULT_OFFSET ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); if ($limit < 0) $limit = 3999999999; // Limite maximum à 4 milliard... if ($offset < 0) $offset = 0; // Moins de zéro = impossible Loading @@ -186,7 +186,7 @@ abstract class Service implements ServiceManagerAwareInterface $i = 0; ErrorHandler::start(E_WARNING); for ($entry=ldap_first_entry($resource,$search); $entry; $entry=ldap_next_entry($resource,$entry)) { $value = ldap_get_values_len($resource,$entry,$key)[0]; list($value) = ldap_get_values_len($resource,$entry,$key); if (null !== $value){ $result[] = $value; $i++; Loading Loading @@ -233,7 +233,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function searchAttributes( $filter, array $attributes, $orderBy=null, $limit=self::DEFAULT_LIMIT, $offset=self::DEFAULT_OFFSET ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); if ($limit < 0) $limit = 3999999999; // Limite maximum à 4 milliard... if ($offset < 0) $offset = 0; // Moins de zéro = impossible Loading @@ -259,7 +259,7 @@ abstract class Service implements ServiceManagerAwareInterface $i = 0; ErrorHandler::start(E_WARNING); for ($entry=ldap_first_entry($resource,$search); $entry; $entry=ldap_next_entry($resource,$entry)) { $id = ldap_get_values_len($resource,$entry,$key)[0]; list($id) = ldap_get_values_len($resource,$entry,$key); $data = array(); foreach( $attributes as $attribute ){ $attrValue = ldap_get_values_len($resource,$entry,$attribute); Loading Loading @@ -378,7 +378,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function get( $id ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); return $this->getBy( $id, $key ); } Loading @@ -399,7 +399,7 @@ abstract class Service implements ServiceManagerAwareInterface $value = current($value); } $classname = Entity::getNodeParams($this->type)[1]; list($tmp, $classname) = Entity::getNodeParams($this->type); list( $resource, $search ) = $this->__searchBegin( Filter::equals($by, $value), $this->ou, array('*','+') ); $count = ldap_count_entries($resource, $search); switch( $count ){ Loading Loading @@ -428,7 +428,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function getAll( $ids, $orderBy=null ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); return $this->getAllBy($ids, $key, $orderBy); } Loading Loading @@ -472,7 +472,7 @@ abstract class Service implements ServiceManagerAwareInterface */ public function exists( $id ) { $key = Entity::getNodeParams($this->type)[0]; list($key) = Entity::getNodeParams($this->type); return $this->existsBy($id, $key); } Loading