Class DataContainerInterface

Description

The DataContainer Interface defines the required methods for any DataContainer class or child.

  • version: $Id: DataContainer.interface.php,v 1.6 2007/09/04 20:25:54 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/utilities/DataContainer.interface.php (line 13)


	
			
Direct descendents
Class Description
DataContainer The DataContainer class encapsulates a FieldSet, and a RuleSet and sets up field-setting restrictions.
Method Summary
void add (string $field, ref $rule, [optional $error = null])
boolean checkAll ()
mixed get (string $field)
void init ()
boolean set (string $field, mixed $val)
Methods
add (line 32)

The add method adds a new field with associated rule and optional error if validation fails.

  • access: protected
void add (string $field, ref $rule, [optional $error = null])
  • string $field: The key of the field to add.
  • ref $rule: object ValidatorRule $rule The validator rule to apply to the value set to this key.
  • optional $error: object Error $error The error to throw if validation of this key fails.

Redefined in descendants as:
  • DataContainer::add() : The add method adds a new field with associated rule and optional error if validation fails.
checkAll (line 62)

Goes through all the keys and makes sure they comply to the rules specified for them.

  • return: TRUE if all are OK, FALSE otherwise.
  • access: public
boolean checkAll ()

Redefined in descendants as:
get (line 42)

The get method returns the value stored in the FieldSet for $field.

  • return: The value of $field.
  • access: public
mixed get (string $field)
  • string $field: The field to get.

Redefined in descendants as:
init (line 20)

The init function -- sets up the private variables.

  • access: protected
void init ()

Redefined in descendants as:
set (line 53)

The set method sets the value for a field while checking constrictions.

  • return: True if setting $field succeeds.
  • access: public
boolean set (string $field, mixed $val)
  • string $field: The field to set.
  • mixed $val: The value to set $field to.

Redefined in descendants as:

Documentation generated on Wed, 19 Sep 2007 10:22:29 -0400 by phpDocumentor 1.3.0RC3