phpDocumentor CCL
[ class tree: CCL ] [ index: CCL ] [ all elements ]

Class: Reference

Source Location: /Reference.php

Class Reference

Class Overview

A reference parameter in terms of relational database design

Located in /Reference.php [line 13]

Param
   |
   --Reference

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Param

Param::$allow_html
Param::$default
Param::$display
Param::$hint
Param::$input_class
Param::$name
Param::$primary_key
Param::$required
Param::$title
Param::$type

Inherited From Param

Param::__construct()
Constructs parameter object
Param::cast()
Casts a value due to parameter type
Param::display()
Renders param value display in a correct way
Param::display_input()
Renders param input display in a correct way
Param::import()
Imports parameter value from user input
Param::prepare()
Prepares a parameter value for use in database statement

[ Top ]
Property Summary
array   $cache   Is used to cache referenced keys/values not to query them every time
string   $caption   If caption parameter is not specified, the key will be used itself
Entity   $entity  

[ Top ]
Method Summary
Reference   __construct()  
string   display()   Renders param value display in a correct way
string   display_input()   Renders param input display in a correct way
array   get_item()   Gets a result row for referenced item which you can pass to constructor of exact class
void   refresh()   Refreshes key/value cache for the reference

[ Top ]
Properties
array   $cache = array() [line 27]

Is used to cache referenced keys/values not to query them every time

API Tags:
Access:  public


[ Top ]
string   $caption = '' [line 22]

If caption parameter is not specified, the key will be used itself

API Tags:
Access:  public


[ Top ]
Entity   $entity [line 17]
API Tags:
Access:  public


[ Top ]
Methods
Constructor __construct  [line 37]

  Reference __construct( string $name, Entity $entity, [string $caption = ''], [bool $display = TRUE], [bool $required = FALSE]  )

Parameters:
string   $name:  Parameter name
Entity   $entity:  Referenced entity
string   $caption:  Parameter of referenced entity displayed as a caption
bool   $display:  Render it in templates
bool   $required:  Require non-empty value from user input

API Tags:
Access:  public


Redefinition of:
Param::__construct()
Constructs parameter object

[ Top ]
display  [line 74]

  string display( mixed $value  )

Renders param value display in a correct way

Parameters:
mixed   $value: 

API Tags:
Return:  Rendered display element
See:  Param::display_input(), Param::title, Param::hint
Access:  public


Redefinition of:
Param::display()
Renders param value display in a correct way

[ Top ]
display_input  [line 88]

  string display_input( [mixed $value = NULL], [string $prefix = ''], [int $exclude = NULL]  )

Renders param input display in a correct way

Parameters:
mixed   $value: 
string   $prefix:  Input name prefix
int   $exclude:  Exclude this item from list (usually self)

API Tags:
See:  Param::title, Param::hint
Access:  public


Redefinition of:
Param::display_input()
Renders param input display in a correct way

[ Top ]
get_item  [line 125]

  array get_item( int $value  )

Gets a result row for referenced item which you can pass to constructor of exact class

Parameters:
int   $value:  Reference key value

API Tags:
Return:  SQL result row
Access:  public


[ Top ]
refresh  [line 55]

  void refresh( )

Refreshes key/value cache for the reference


API Tags:
Access:  public


[ Top ]

Documentation generated on Thu, 09 Jul 2009 14:11:35 +0400 by phpDocumentor 1.4.1