Cnz_Html
[
class tree: Cnz_Html
] [
index: Cnz_Html
] [
all elements
]
Todo List
Packages:
Cnz
Cnz_Html
Source for file Column.php
Documentation is available at
Column.php
<?php
/**
* CNZ Framework
*
* A Framework for Creating and Using Complex Web Elements
*
* The purpose of this framework is to provide a library of high-level objects
* to facilitate common HTML coding tasks, such as menus, tables, and forms.
* The intent is to reduce repetitive HTML coding as much as possible, replacing
* it with a combination of configuration files and style sheets with
* standardized naming conventions.
*
* This framework is built on and requires the
*
{@link http://framework.zend.com/ Zend Framework}
.
*
*
@category
Cnz
*
@package
Cnz_Html
*
@subpackage
Table
*
*
@author
Lyle Frost <lfrost@cnz.com>
*
@copyright
Copyright (c) 2006-2007 Citadel Network <
{@link http://www.citadelnetwork.com/}
>
*
@filesource
*
@license
http://www.citadelnetwork.com/license/cnzframework New BSD License
*
@version
$Id: Column.php 27 2007-07-19 18:47:54Z lfrost $
*/
/**
* HTML Table Column class
*
* This class is probably not useful directly. It could be an inner class
* of Html_Table, if PHP supported inner classes.
*
* This class does represent displayable objects.
*
*
@category
Cnz
*
@package
Cnz_Html
*
@subpackage
Table
*/
class
Cnz_Html_Table_Column
{
/**#@+ @var boolean */
private
$noWrap
=
false
;
/**#@-*/
/**#@+ @var string */
private
$align
=
NULL
;
private
$expression
=
NULL
;
private
$heading
=
NULL
;
/** Scheme for a href */
private
$link
=
NULL
;
private
$name
=
NULL
;
private
$order
=
NULL
;
/** data type */
private
$type
=
NULL
;
/**#@-*/
/* Getters/Setters ===================================================*/
/**
@return
string
Align */
public
function
getAlign
(
)
{
return
$this
->
align
;
}
/**
@return
string
Expression */
public
function
getExpression
(
)
{
return
$this
->
expression
;
}
/**
@return
string
Heading */
public
function
getHeading
(
)
{
return
$this
->
heading
;
}
/**
@return
string
Link */
public
function
getLink
(
)
{
return
$this
->
link
;
}
/**
@return
string
Name */
public
function
getName
(
)
{
return
$this
->
name
;
}
/**
@return
string
noWrap */
public
function
getNoWrap
(
)
{
return
$this
->
noWrap
;
}
/**
@return
string
Order */
public
function
getOrder
(
)
{
return
$this
->
order
;
}
/**
@return
string
Type */
public
function
getType
(
)
{
return
$this
->
type
;
}
/* Methods ===========================================================*/
/**
* Option fields:
* name
*
* Configuration fields:
* align Alignment
* expression SQL expression
* heading Column heading
* link Link type
* noWrap HTML nowrap
* order Sort order
* type Data type
*
*
@param
array
$options
Options
*
@param
Zend_Config
$config
Configuration
*/
public
function
__construct
(
array
$options
=
array
(
)
,
Zend_Config
$config
=
NULL
)
{
// Process options.
if
(
isset
(
$options
[
'name'
]
))
$this
->
name
=
strtolower
(
$options
[
'name'
]
)
;
// Process configuration.
if
(
isset
(
$config
->
align
))
$this
->
align
=
strtolower
(
$config
->
align
)
;
// HACK: Zend_Config_Ini does not allow " in values.
if
(
isset
(
$config
->
expression
))
$this
->
expression
=
str_replace
(
'`'
,
'"'
,
$config
->
expression
)
;
if
(
isset
(
$config
->
heading
))
$this
->
heading
=
$config
->
heading
;
if
(
isset
(
$config
->
link
))
$this
->
link
=
$config
->
link
;
if
(
isset
(
$config
->
noWrap
))
$this
->
noWrap
=
Cnz_Html
::
configFlag
(
$config
->
noWrap
)
;
if
(
isset
(
$config
->
order
))
$this
->
order
=
strtolower
(
$config
->
order
)
;
if
(
isset
(
$config
->
type
))
$this
->
type
=
strtolower
(
$config
->
type
)
;
}
}
Documentation generated on Thu, 19 Jul 2007 15:01:58 -0400 by
phpDocumentor 1.4.0RC2