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 Whups for the projects/add method $this->registry['projects']['add'] = 'whups';
// Tell the Registry what function to call to implement Whups' // projects/add method, what file to find that function's definition // in, the function arguments, and the return type. $this->services['whups']['projects']['add'] = array( 'file' => '%application%/lib/api.php', 'function' => 'whupsAddModule', 'args' => array('name'), 'type' => 'integer' );
?>
|