Net_CDDB
[ class tree: Net_CDDB ] [ index: Net_CDDB ] [ all elements ]

File: Server.php

Source Location: /Net_CDDB-0.3.0/CDDB/Server.php

Classes:

Net_CDDB_Server
CDDB Server (ALPHA QUALITY, *USE AT YOUR OWN RISK!*)

Page Details:

Object-oriented CDDB Server components

Alpha-quality CDDB server capable of serving CDDB requests over a variety of CDDB protocol options (HTTP only for now, more coming soon) and using a variety of data sources.

Includes:

require_once('Net/CDDB.php') [line 21]
Need the constants from this file...

NET_CDDB_SERVER_HOOK_COMMAND [line 72]

NET_CDDB_SERVER_HOOK_COMMAND = 'command'
A hook that runs for each command the CDDB server recieves

The function signature for response hooks should look like this:

  1.  function your_command_hook(&$str_the_cddb_command)
  2.  {
  3.      ...
  4.      // return true; (if you want the CDDB server to not run any other command hooks)
  5.      // return false; (if you want the CDDB server to continue to run the other command hooks)
  6.  }


[ Top ]



NET_CDDB_SERVER_HOOK_REQUEST [line 38]

NET_CDDB_SERVER_HOOK_REQUEST = 'request'
A hook that runs when the server receives the request

The function signature for request hooks should look like this:

  1.  function your_request_hook(&$arr_a_list_of_cddb_commands_passed_in_the_request)
  2.  {
  3.      ...
  4.      // return true; (if you want the CDDB server to not run any other request hooks)
  5.      // return false; (if you want the CDDB server to continue to run the other request hooks)
  6.  }


[ Top ]



NET_CDDB_SERVER_HOOK_RESPONSE [line 55]

NET_CDDB_SERVER_HOOK_RESPONSE = 'response'
A hook that runs whenever the server responds to a request

The function signature for response hooks should look like this:

  1.  funtion your_response_hook($cmd&$int_response_code&$str_response_message&$str_any_data_returned_with_request&$bln_whether_or_not_to_add_a_period_as_a_termination_character)
  2.  {
  3.      ...
  4.      // return true; (if you want the CDDB server to not run any other response hooks)
  5.      // return false; (if you want the CDDB server to continue to run the other response hooks)
  6.   }


[ Top ]



Documentation generated on Sun, 25 Feb 2007 14:00:18 -0500 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.