Class Resource

Description

Class Resource is an abstract persistance Adapter for HTTP Services

Resources are used by Services to manipulate and load data (e.g. from a database) into representations.

Resources are using DAO objects to operate on storage engines like databases or a filesystem. The difference between a DAO and a resource is that a DAO usually implements the connection to a single entity (e.g. a database table) and a Resource may use multiple DAO objects.

Resources inherit from ValueObject to provide a defined interface to an internal storage map.

Located in /resource.php (line 27)

PHOOL
   |
   --ValueObject
      |
      --Resource
Method Summary
Resource Resource ([mixed $data = array( )])
mixed clean_data ()
boolean is_valid ()
mixed load (mixed $id)
boolean remove ()
boolean save ()
Variables
Methods
Constructor Resource (line 34)

Constructor

Resource Resource ([mixed $data = array( )])
  • mixed $data: default data to register [optional]
clean_data (line 78)

Data cleanup tool

mixed clean_data ()
is_valid (line 67)

Validate a Resource before save

  • return: success
boolean is_valid ()
load (line 46)

Load resource data

  • abstract:
mixed load (mixed $id)
  • mixed $id: scalar identifier
remove (line 60)

Remove resource data

  • return: success
  • abstract:
boolean remove ()
save (line 53)

Insert or update resource data

  • return: success
  • abstract:
boolean save ()

Inherited Methods

Inherited From ValueObject

ValueObject::ValueObject()
ValueObject::clear()
ValueObject::erase()
ValueObject::get()
ValueObject::get_all()
ValueObject::get_keys()
ValueObject::get_size()
ValueObject::get_type()
ValueObject::has()
ValueObject::set()
ValueObject::set_all()

Inherited From PHOOL

PHOOL::PHOOL()
PHOOL::debug()
PHOOL::error()
PHOOL::get_errors()
PHOOL::handle_error()
PHOOL::has_error()
PHOOL::log_error()
PHOOL::set_debug()
PHOOL::set_logdir()
PHOOL::set_loglevel()
Class Constants

Inherited Constants

Inherited from PHOOL

PHOOL::ERROR
PHOOL::UNKNOWN
PHOOL::USER
PHOOL::WARNING

Documentation generated on Tue, 12 May 2009 23:09:41 +0200 by phpDocumentor 1.4.1