[dev] Driver capability assertions

Jon Parise jon@csh.rit.edu
Sat, 17 Feb 2001 16:13:20 -0500


On Sat, Feb 17, 2001 at 10:33:25AM -0600, Brent J. Nordquist wrote:

> > >     if (!function_exists('ldap_connect')) {
> > >         echo 'LDAP support is required by this driver.';
> > >         exit;
> > >     }
> >
> > I like this. :-)
> 
> So do I.  What about a facility in the Horde framework to provide this; a
> Horde function that could be called to check on a mandatory capability,
> produce a suitable error message, and exit.  (Could it check on whether
> the headers have been sent or not?)  But that way the code to check would
> be clean (a one-liner).
 
The only problem with adding such a facility to the Horde framework is
the creation of an additional dependency on another Horde class.  I'll
implement it this way, anyway, because it's the better thing to do,
and it's more reusable this way.

-- 
Jon Parise (jon@csh.rit.edu)  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member