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

Class: Net_CDDB_Server

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

Class Overview

Net_CDDB
   |
   --Net_CDDB_Server

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


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: Net_CDDB

Net_CDDB::calculateDiscId()
Calculate a disc ID based on the track offsets and the disc length
Net_CDDB::debug()
Enables or disables debugging ( prints out all responses/requests )
Net_CDDB::_createProtocol()
Create a protocol instance of the given type with the given parameters
Net_CDDB::_debug()
Prints/logs debugging messages
Net_CDDB::_parseRecord()
Parse a CDDB style database record into an array
Net_CDDB::_parseResult()
Parse a result string returned by a CDDB query into an array

Class Details

[line 46]
CDDB Server (ALPHA QUALITY, *USE AT YOUR OWN RISK!*)

*** WARNING *** Use at your own risk, it doesn't work very well yet!

Current features:

  • CDDB protocol level 5
  • Multiple data sources: tell the server to read from a local filesystem, a remote HTTP CDDB server, a remote CDDBP server, a database (coming soon) etc.
  • Supports about half of the CDDB commands
Known issues:
  • Extremelly lightly tested (use at your own risk!)
  • Command: 'motd' reports and incorrect last modified date
  • Lack of any error reporting...
  • Lack of any login/hello command support
  • Only supports protocol level 5
  • Only provides HTTP request support (no CDDBP or SMTP... yet)

  • Author: Keith Palmer <Keith@UglySlug.com>
  • Todo: Probably have the Net_CDDB_Request_* classes have three methods: getHello(), getProto(), and getCmd() or something


[ Top ]


Class Variables

$_protocol =

[line 62]

Net_CDDB_Protocol_* object instance to use for data access
  • Access: protected

Type:   object


[ Top ]

$_request =

[line 54]

Net_CDDB_Request_* object instance to use for listening for requests
  • Access: protected

Type:   object


[ Top ]



Method Detail

__construct (Constructor)   [line 92]

Net_CDDB_Server __construct( string $request_dsn, string $protocol_dsn, [array $options = array()])

Constructor (PHP v5.x)
  • Access: public

Parameters:

string   $request_dsn   — 
string   $protocol_dsn   — 
array   $options   — 

[ Top ]

Net_CDDB_Server (Constructor)   [line 78]

Net_CDDB_Server Net_CDDB_Server( $request_dsn, $protocol_dsn, [ $options = array()])

Constructor (PHP v4.x)

Parameters:

   $request_dsn   — 
   $protocol_dsn   — 
   $options   — 

[ Top ]

start   [line 134]

boolean start( )

Start the CDDB server
  • Todo: Listen forever support (daemon mode)
  • Access: public

[ Top ]

_cddbHello   [line 218]

void _cddbHello( )

Dummy placeholder for 'cddb hello' command
  • Access: protected

[ Top ]

_cddbLscat   [line 232]

void _cddbLscat( string $cmd, string $query)

Respond to the 'cddb lscat' CDDB command (list categories)
  • Access: protected

Parameters:

string   $cmd   — 
string   $query   — 

[ Top ]

_cddbQuery   [line 294]

void _cddbQuery( string $cmd, string $query)

Respond to the 'cddb query ...' CDDB command
  • Access: protected

Parameters:

string   $cmd   — 
string   $query   — 

[ Top ]

_cddbRead   [line 263]

void _cddbRead( string $cmd, string $query)

Respond to the 'cddb read ...' CDDB command
  • Access: protected

Parameters:

string   $cmd   — 
string   $query   — 

[ Top ]

_createRequest   [line 107]

Net_CDDB_Request _createRequest( string $dsn, array $options)

Create a Net_CDDB_Request object instance
  • Return: Returns an instance of a subclass of Net_CDDB_Request (i.e: Net_CDDB_Request_HTTP instance)
  • Access: protected

Parameters:

string   $dsn   — 
array   $options   — 

[ Top ]

_motd   [line 322]

void _motd( string $cmd, string $query)

Respond to the CDDB 'motd' command
  • Todo: Find out the motd modified time somehow...?
  • Access: protected

Parameters:

string   $cmd   — 
string   $query   — 

[ Top ]

_proto   [line 206]

void _proto( )

Dummy placeholder for the 'cddb proto' command
  • Access: protected

[ Top ]

_ver   [line 353]

void _ver( string $cmd, string $query)

Respond to the CDDB 'ver' command
  • Access: protected

Parameters:

string   $cmd   — 
string   $query   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:40:17 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.