-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Doing quite a number of Drupal projects we found out that for our developers the procedural nature of Drupal is always an obstacle. Furthermore as they are used to at least unit test their code, they always complaining about the tight coupling and 'invisible' dependencies you have to agree on when using the Drupal functions, we had to come up with some kind on an abstraction layer to instantiate a dedicated border between our and the Drupal world; the LiipDrupalConnectorModule was born.
There are already quite a number of adapters implemented to connect the procedural world of Drupal.
The Cache adapter reflect every available caching function provided by the Drupal core. We are aware of the DrupalCacheInterface and the DrupalDatabaseCache but since in the end the cache will always call one of the reflected functions we are confident just to ignore both interface and implementation.
The Common adapter gathers functions like t() or l() which currently do not fit into whatever specialized adapter.
The Database adapter provides an OOP-API to almost every database related function. I currently do not know if there is any function missing. Fell free to add more if you feel some are left out.
This class is the big bowl of left overs from our first trial to build an adapter to Drupal. Since we did not find a more proper place for the functions reflected by this class it is just like it was since the beginning of our efforts.
In analogy to every other adaptor, the Module adapter gathers those functions related to the module api of Drupal.
The Node adapter currently only reflects a subset of the from our point of view most used node related functions. Nevertheless there is still some room for improvements.
The User adapter is analog to the Module adapter just a subset of the currently available functions to handle a user in Drupal. Still we reflected only the in our cases most used functions.