Example class definition

  1. <?php
  2. /**
  3.  * Available Web Services
  4.  *
  5.  * @package blocks/helloworld
  6.  * @author Mark Nielsen
  7.  */
  8. class blocks_helloworld_lib_server_service extends mr_server_service_abstract {
  9.     /**
  10.      * Constructor hook: this is a great place to call mr_on
  11.      *
  12.      * @return void 
  13.      */
  14.     protected function init({
  15.         if (!mr_on('helloworld''block')) {
  16.             throw new Exception('Block is not enabled: blocks/helloworld');
  17.         }
  18.     }
  19.  
  20.     /**
  21.      * Test Service
  22.      *
  23.      * @param string $say Tell the service what to say
  24.      * @return string 
  25.      */
  26.     public function test($say{
  27.         return $this->response->test($say);
  28.     }
  29. }

Documentation generated on Thu, 28 Jun 2012 16:33:45 -0700 by phpDocumentor 1.4.3