Class metadata_element

Description

A class which encapsulates a metadata element. This is the actual object which will be rendered into the end-user content (eg. the webpage), and contains everything necessary for that process.

Located in /metadata-defs.php (line 465)

RenderableObject
   |
   --metadata_element
Variable Summary
Method Summary
 metadata_element metadata_element ([mixed $element_id = ""], [mixed $schema_name = ""])
 string definition_form ([mixed $formname = ""])
 boolean get ([integer $element_id = ""], [string $schema_name = ""])
 void get_info ()
 void get_schemes ()
 string html ()
 void inherit_schemes ()
 object The metatag ()
 void POSTprocess ()
 void set_language (string $lang)
 void set_scheme (integer $scheme_id, [string $scheme_tag = ""])
 void set_tag_value (string $val)
 void set_uri (mixed $uri, string $href)
Variables
mixed $base_element = true (line 528)

Whether this is a base element, or has a parent

mixed $child_element_ids = array() (line 479)

Child element_ids of this element

mixed $default_value = "" (line 505)

The default value for this element

mixed $description = "" (line 495)

Element description, usage details

mixed $display_order = 0 (line 509)

Order of display

mixed $element_id = "" (line 475)

The element ID for this item

mixed $element_name = "" (line 489)

The base name of this element

mixed $enc_scheme_id = "" (line 524)

The encoding scheme/vocabulary used to pick the tag content

mixed $enc_scheme_tag = "" (line 526)

The tag used to identify the encoding scheme used

mixed $gotinfo = false (line 468)

Whether info has been already got

mixed $gotschemes = false (line 470)

Whether schemes have been already got

mixed $indexed = false (line 497)

Whether this element should be indexed

mixed $instantiated = false (line 481)

Whether this element is instantiated as layout metadata

mixed $label = "" (line 493)

Label against the element value field

mixed $language = "" (line 522)

The language of the content or resource referenced by URI

mixed $linked_uri = false (line 520)

Whether the tag value is actually a URL/URI

mixed $list_of_values = "" (line 507)

A list of permitted element values

mixed $obligation = "o" (line 501)

Whether optional, mandatory, conditional or recommended

mixed $obligation_desc = "" (line 503)

Obligation, descriptive

mixed $parent_element_id = "" (line 477)

The element ID of the parent element of this item

mixed $preferred_scheme_id = "" (line 514)

ID of preferred scheme for this metadata element

mixed $schema_name = "" (line 483)

The meta schema that this item was sourced from

mixed $schema_namespace = "" (line 485)

The namespace code for the schema

mixed $schema_namespace_uri = "" (line 487)

The refence URi for the schema

mixed $schemes = array() (line 512)

Schemes associated with this metadata element. This

mixed $searchable = false (line 499)

Whether this element can be searched for

mixed $tag_name = "" (line 491)

The full tag name of this element

mixed $tag_value (line 518)

The content of this metadata tag. This is the actual metadata

mixed $valid = false (line 472)

Whether object contains valid data

Methods
Constructor metadata_element (line 531)

Constructor

metadata_element metadata_element ([mixed $element_id = ""], [mixed $schema_name = ""])
definition_form (line 748)

Render a definition form for this metadata element as HTML. This is a self-contained table, and it has all of the element details, and fields for setting the content, language, and scheme. It is not enclosed in a form.

  • return: An HTML rendering of metadata definition fields
string definition_form ([mixed $formname = ""])
get (line 542)

Get all the relevant data for this metadata element.

  • return: Whether the get succeeded and object is valid
boolean get ([integer $element_id = ""], [string $schema_name = ""])
  • integer $element_id: ID of this metadata element
  • string $schema_name: Name of schema set this element belongs to
get_info (line 589)

Get all the info which are associated with this metadata element.

void get_info ()
get_schemes (line 622)

Get all the schemes which are associated with this metadata element.

void get_schemes ()
html (line 1018)

Render this metadata element as HTML.

  • return: The HTML rendering of this metadata element
string html ()

Redefinition of:
RenderableObject::html()
Return output suitable for normal HTML-capable device. This method must be over-ridden by a method of the same name in the descendant class which renders output to web browsers.
inherit_schemes (line 660)

Inherit schemes from parent metadata elements. This involves a traversal of the lineage (parentage) of this current metadata element and retreival of the schemes of each one. Where the scheme is not already associated with this element, it is added.

void inherit_schemes ()
metatag (line 994)

Render this metadata element as a metatag object. This method creates the metatag object and returns it.

  • return: metadata element as a metatag object
object The metatag ()
POSTprocess (line 957)

Process the POST of the form of this metadata element. We are just looking for the few fields containing the relevant data.

NOTE: We do NOT save anything to the database, we just update our class variables with the newly POSTed data.

void POSTprocess ()
set_language (line 715)

Set the language of the content of this meta data element

void set_language (string $lang)
  • string $lang: The language code for the content of this element
set_scheme (line 727)

Set the scheme used to define the content of this meta data element. If the tag of the scheme is not specified, then we go and find it by looking up the scheme record in the DB.

void set_scheme (integer $scheme_id, [string $scheme_tag = ""])
  • integer $scheme_id: The ID of the scheme used for picking the content
  • string $scheme_tag: The tag name of the scheme
set_tag_value (line 694)

Set the tag value of this meta data element. This is used when the content is NOT a URI/URL. If it is, then use set_uri() instead.

void set_tag_value (string $val)
  • string $val: The value for this meta data element content
set_uri (line 705)

Set the tag value to be a URI. Same as setting tag value but we also flick the uri flag as well.

void set_uri (mixed $uri, string $href)
  • string $href: The URL/URI for this meta data element

Inherited Methods

Inherited From RenderableObject

 RenderableObject::RenderableObject()
 RenderableObject::html()
 RenderableObject::render()
 RenderableObject::wml()
 RenderableObject::wmlup()
 RenderableObject::xml()

Documentation generated by phpDocumentor 1.3.0RC3