From cf2866659d0f9ee106ac788571f33f834c4c6e5e Mon Sep 17 00:00:00 2001 From: Eduardo Alvarez Fernandez <eduardoa@cern.ch> Date: Fri, 11 Oct 2019 10:38:05 +0200 Subject: [PATCH] Add services yml file and service class --- cern_ldap_api.services.yml | 3 +++ src/CERNLdapService.php | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 cern_ldap_api.services.yml diff --git a/cern_ldap_api.services.yml b/cern_ldap_api.services.yml new file mode 100644 index 0000000..008e603 --- /dev/null +++ b/cern_ldap_api.services.yml @@ -0,0 +1,3 @@ +services: + cern_lda_api.cernldap: + class: Drupal\cern_ldap_api\CERNLdapService \ No newline at end of file diff --git a/src/CERNLdapService.php b/src/CERNLdapService.php index 295a57a..fca5287 100644 --- a/src/CERNLdapService.php +++ b/src/CERNLdapService.php @@ -2,4 +2,23 @@ namespace Drupal\cern_ldap_api; -Class CERNLdapService \ No newline at end of file +/** + * CERNLdapService is a service to contact CERN Ldap service + */ + +Class CERNLdapService { + private $server_host = "xldap.cern.ch"; + + /** + * Resolves emails for an e-group + * @param string $egroup + * The egroup name in simple formar, ex: drupal-admins + * @param bool $recursive + * Flag to enable/disable recursive lookup of inner e-groups + */ + public function resolveEgroup($egroup, $recursive) { + + } + + +} \ No newline at end of file -- GitLab