Feed: ezcFeedSchema
[ ]
[ Specifications ]
[ ]
[ ]
[ ]
[ ]
Class: ezcFeedSchema
|
Class providing handling of feed schemas. [
source]
Member Variables
|
protected array(string=>mixed) |
$schema
Holds a feed schema. |
Method Summary
|
public ezcFeedSchema |
__construct(
$schema )
Creates a new feed schema. |
|
public array(string) |
getAtLeastOne(
[$element = null] )
Returns the elements which need to be present at least once defined for the element $element in this feed schema. If $element is null then it returns the elements which need to be present at least once in the root. |
|
public array(string) |
getAttributes(
$element, [$subElement = null], [$childElement = null] )
Returns the attributes defined for the element $element in this feed schema. |
|
public array(string=>string) |
getElementsMap(
)
Returns the mapping of ezcFeed names to feed element names. |
|
public array(string=>string) |
getItemsMap(
)
Returns the mapping of ezcFeed names to feed items element names. |
|
public string |
getMulti(
$element, [$subElement = null] )
Returns the multiple name for the $element. If $subElement is present then returns the multiple name for the subelement $subElement of $element. |
|
public array(string) |
getOptional(
[$element = null], [$subElement = null], [$childElement = null] )
Returns the optional elements defined for the element $element in this feed schema. If $element is null then it returns the optional elements in the root. |
|
public array(string) |
getRequired(
[$element = null], [$subElement = null], [$childElement = null] )
Returns the required elements defined for the element $element in this feed schema. If $element is null then it returns the required elements in the root. |
|
public array(string) |
getRequiredAttributes(
$element, [$subElement = null], [$childElement = null] )
Returns the required attributes defined for the element $element in this feed schema. |
|
public array(string=>mixed) |
getSchema(
$element )
Returns the subschema which defines the element $element. |
|
public bool |
isAttribute(
$element )
Returns whether the $element is an attribute. |
|
public bool |
isEmpty(
$element, [$subElement = null], [$childElement = null] )
Returns if $element does not accept a value for the root node. If $subElement is present then returns if the subelement $subElement of element $element accepts a value for the root node. |
|
public bool |
isMulti(
$element, [$subElement = null] )
Returns whether the $element accepts multiple values or not. If $subElement is present then returns whether the $subElement of $element accepts multiple values or not. |
Methods
__construct
ezcFeedSchema __construct(
$schema )
Creates a new feed schema.
Parameters
| Name |
Type |
Description |
$schema |
array(string=>mixed) |
The new schema for this class |
getAtLeastOne
array(string) getAtLeastOne(
[string
$element = null] )
Returns the elements which need to be present at least once defined for the element $element in this feed schema. If $element is null then it returns the elements which need to be present at least once in the root.
Parameters
| Name |
Type |
Description |
$element |
string |
The schema element |
getAttributes
array(string) getAttributes(
string
$element, [string
$subElement = null], [string
$childElement = null] )
Returns the attributes defined for the element $element in this feed schema.
Parameters
| Name |
Type |
Description |
$element |
string |
The schema element |
$subElement |
string |
The subelement of $element |
$childElement |
string |
The subelement of $subElement |
getElementsMap
array(string=>string) getElementsMap(
)
Returns the mapping of ezcFeed names to feed element names.
getItemsMap
array(string=>string) getItemsMap(
)
Returns the mapping of ezcFeed names to feed items element names.
getMulti
string getMulti(
string
$element, [string
$subElement = null] )
Returns the multiple name for the $element. If $subElement is present then returns the multiple name for the subelement $subElement of $element.
Parameters
| Name |
Type |
Description |
$element |
string |
The schema element |
$subElement |
string |
The subelement of $element |
getOptional
array(string) getOptional(
[string
$element = null], [string
$subElement = null], [string
$childElement = null] )
Returns the optional elements defined for the element $element in this feed schema. If $element is null then it returns the optional elements in the root.
Parameters
| Name |
Type |
Description |
$element |
string |
The schema element |
$subElement |
string |
The sub-element of $element |
$childElement |
string |
The subelement of $subElement |
getRequired
array(string) getRequired(
[string
$element = null], [string
$subElement = null], [string
$childElement = null] )
Returns the required elements defined for the element $element in this feed schema. If $element is null then it returns the required elements in the root.
Parameters
| Name |
Type |
Description |
$element |
string |
The schema element |
$subElement |
string |
The subelement of $element |
$childElement |
string |
The subelement of $subElement |
getRequiredAttributes
array(string) getRequiredAttributes(
string
$element, [string
$subElement = null], [string
$childElement = null] )
Returns the required attributes defined for the element $element in this feed schema.
Parameters
| Name |
Type |
Description |
$element |
string |
The schema element |
$subElement |
string |
The subelement of $element |
$childElement |
string |
The subelement of $subElement |
getSchema
array(string=>mixed) getSchema(
string
$element )
Returns the subschema which defines the element $element.
Parameters
| Name |
Type |
Description |
$element |
string |
The schema element |
isAttribute
bool isAttribute(
string
$element )
Returns whether the $element is an attribute.
Parameters
| Name |
Type |
Description |
$element |
string |
The schema element |
isEmpty
bool isEmpty(
string
$element, [string
$subElement = null], [string
$childElement = null] )
Returns if $element does not accept a value for the root node. If $subElement is present then returns if the subelement $subElement of element $element accepts a value for the root node.
Parameters
| Name |
Type |
Description |
$element |
string |
The schema element |
$subElement |
string |
The subelement of $element |
$childElement |
string |
The subelement of $subElement |
isMulti
bool isMulti(
string
$element, [string
$subElement = null] )
Returns whether the $element accepts multiple values or not. If $subElement is present then returns whether the $subElement of $element accepts multiple values or not.
Parameters
| Name |
Type |
Description |
$element |
string |
The schema element |
$subElement |
string |
The subelement of $element |
Last updated: Mon, 05 May 2008