Nag Preferences
Registry API
Registry API 2


Exposing an application's API through the registry means writing the API file and adding the definition of the methods to the registry config file.

<?php

// Tell the Registry to use Turba for the contacts/search method
$this->registry['contacts']['search'] = 'turba';

// Tell the Registry what function to call to implement Turba's contacts/search,
// and what file to find its definition in.
$this->services['turba']['contacts']['search'] = array(
    
'file' => '%application%/lib/api.php',
    
'function' => 'turbaExpandAddresses',
    
'args' => array('addresses''addressbooks')
);

?>