Zeta Components Manual :: Docs For Class ezcFeedDublinCoreModule
Feed::ezcFeedDublinCoreModule
Class ezcFeedDublinCoreModule
Support for the DublinCore module: data container, generator, parser.
Specifications: http://dublincore.org/documents/dces/.
Each DublinCore property can appear multiple times both on the feed-level or the item-level.
Each DublinCore property can have the language attribute, which appears in the generated XML file as a 'xml:lang' attribute.
Create example:
- <?php
 - // $feed is an ezcFeed object
 - $module = $item->addModule( 'DublinCore' );
 - $creator->name = 'Creator name';
 - $creator->language = 'en'; // optional
 - // more elements of the same type can be added
 - ?>
 
Parse example:
- <?php
 - // $item is an ezcFeedEntryElement object
 - foreach ( $item->DublinCore->creator as $creator )
 - {
 - echo $creator->name;
 - echo $creator->language;
 - }
 - ?>
 
Source for this file: /Feed/src/modules/dublincore_module.php
ezcFeedModule | --ezcFeedDublinCoreModule
| Version: | //autogentag// | 
Properties
| array(ezcFeedPersonElement) | read/write | 
          
            $contributor
                      
          An entity responsible for making contributions to                                        the resource.                                        Usually the name of a person, organization or service.          | 
      
| array(ezcFeedTextElement) | read/write | 
          
            $coverage
                      
          The spatial or temporal topic of the resource, the                                      spatial applicability of the resource, or the                                      jurisdiction under which the resource is relevant.                                      A recommended practice is to use a controlled                                      vocabulary such as                                      TGN.          | 
      
| array(ezcFeedPersonElement) | read/write | 
          
            $creator
                      
          An entity responsible for making the resource.                                        Usually the name of a person or organization.          | 
      
| array(ezcFeedDateElement) | read/write | 
          
            $date
                      
          A point or period of time associated with an event                                      in the lifecycle of the resource. It is a Unix                                      timestamp, which will be converted to an                                      ISO 8601                                      date when generating the feed.          | 
      
| array(ezcFeedTextElement) | read/write | 
          
            $description
                      
          A description of the resource.          | 
      
| array(ezcFeedTextElement) | read/write | 
          
            $format
                      
          The file format, physical medium, or dimensions of                                      the resource.                                      Recommended best practices is to use a controlled                                      vocabulary such as the list of                                      Internet Media Types                                      (MIME).          | 
      
| array(ezcFeedIdElement) | read/write | 
          
            $identifier
                      
          An unambiguous reference to the resource within a                                    given context.          | 
      
| array(ezcFeedTextElement) | read/write | 
          
            $language
                      
          A language of the resource.                                      Recommended best practice is to use a controlled                                      vocabulary such as                                      RFC 4646.          | 
      
| array(ezcFeedPersonElement) | read/write | 
          
            $publisher
                      
          An entity responsible for making the resource available.                                        Usually the name of a person, organization or service.          | 
      
| array(ezcFeedTextElement) | read/write | 
          
            $relation
                      
          A related resource.          | 
      
| array(ezcFeedTextElement) | read/write | 
          
            $rights
                      
          Information about rights held in and over the resource.          | 
      
| array(ezcFeedSourceElement) | read/write | 
          
            $source
                      
          A related resource from which the described resource                                        is derived.          | 
      
| array(ezcFeedTextElement) | read/write | 
          
            $subject
                      
          The topic of the resource.          | 
      
| array(ezcFeedTextElement) | read/write | 
          
            $title
                      
          The name given to the resource.          | 
      
| array(ezcFeedTextElement) | read/write | 
          
            $type
                      
          The nature or genre of the resource.                                      Recommended best practice is to use a controlled                                      vocabulary such as the                                      DCMI Type Vocabulary          | 
      
Inherited Member Variables
| From ezcFeedModule | |
|---|---|
| protected | 
              ezcFeedModule::$level
              
             | 
          
| protected | 
              ezcFeedModule::$properties
              
             | 
          
Method Summary
| public static string | 
            
              getModuleName(
               )
            
            Returns the module name ('DublinCore').            | 
        
| public static string | 
            
              getNamespace(
               )
            
            Returns the namespace for this module ('http://purl.org/dc/elements/1.1/').            | 
        
| public static string | 
            
              getNamespacePrefix(
               )
            
            Returns the namespace prefix for this module ('dc').            | 
        
| public ezcFeedDublinCoreModule | 
            
              __construct(
                                                                  [                  $level
                   = 'feed']                               )
            
            Constructs a new ezcFeedDublinCoreModule object.            | 
        
| public ezcFeedElement | 
            
              add(
                                                                                    $name
                                                 )
            
            Adds a new ezcFeedElement element with name $name to this module and  returns it.            | 
        
| public void | 
            
              generate(
                                                                                    $xml
                                                    ,                                     $root
                                                 )
            
            Adds the module elements to the $xml XML document, in the container $root.            | 
        
| public bool | 
            
              isElementAllowed(
                                                                                    $name
                                                 )
            
            Returns true if the element $name is allowed in the current module at the  current level (feed or item), and false otherwise.            | 
        
| public void | 
            
              parse(
                                                                                    $name
                                                    ,                                     $node
                                                 )
            
            Parses the XML element $node and creates a feed element in the current  module with name $name.            | 
        
Inherited Methods
| From ezcFeedModule | |
|---|---|
| public ezcFeedModule | 
              ezcFeedModule::__construct()
              Constructs a new ezcFeedModule object.                            | 
          
| public abstract ezcFeedElement | 
              ezcFeedModule::add()
              Adds a new ezcFeedElement element with name $name to this module and  returns it.                            | 
          
| public static ezcFeedModule | 
              ezcFeedModule::create()
              Returns a new instance of the $name module with data container level $level.                            | 
          
| public abstract void | 
              ezcFeedModule::generate()
              Adds the module elements to the $xml XML document, in the container $root.                            | 
          
| public abstract bool | 
              ezcFeedModule::isElementAllowed()
              Returns true if the element $name is allowed in the current module at the  current level (feed or item), and false otherwise.                            | 
          
| public abstract void | 
              ezcFeedModule::parse()
              Parses the XML element $node and creates a feed element in the current  module with name $name.                            | 
          
Methods
getModuleName
Returns the module name ('DublinCore').
getNamespace
Returns the namespace for this module ('http://purl.org/dc/elements/1.1/').
getNamespacePrefix
Returns the namespace prefix for this module ('dc').
__construct
Constructs a new ezcFeedDublinCoreModule object.
Parameters:
| Name | Type | Description | 
|---|---|---|
$level | 
              string | The level of the data container ('feed' or 'item') | 
Redefinition of:
| Method | Description | 
|---|---|
ezcFeedModule::__construct() | 
            Constructs a new ezcFeedModule object. | 
add
Adds a new ezcFeedElement element with name $name to this module and returns it.
Parameters:
| Name | Type | Description | 
|---|---|---|
$name | 
              string | The element name | 
Exceptions:
| Type | Description | 
|---|---|
ezcFeedUnsupportedElementException | 
              if trying to add an element which is not supported. | 
Redefinition of:
| Method | Description | 
|---|---|
ezcFeedModule::add() | 
            Adds a new ezcFeedElement element with name $name to this module and returns it. | 
generate
Adds the module elements to the $xml XML document, in the container $root.
Parameters:
| Name | Type | Description | 
|---|---|---|
$xml | 
              DOMDocument | The XML document in which to add the module elements | 
$root | 
              DOMNode | The parent node which will contain the module elements | 
Redefinition of:
| Method | Description | 
|---|---|
ezcFeedModule::generate() | 
            Adds the module elements to the $xml XML document, in the container $root. | 
isElementAllowed
Returns true if the element $name is allowed in the current module at the current level (feed or item), and false otherwise.
Parameters:
| Name | Type | Description | 
|---|---|---|
$name | 
              string | The element name to check if allowed in the current module and level (feed or item) | 
Redefinition of:
| Method | Description | 
|---|---|
ezcFeedModule::isElementAllowed() | 
            Returns true if the element $name is allowed in the current module at the current level (feed or item), and false otherwise. | 
parse
Parses the XML element $node and creates a feed element in the current module with name $name.
Parameters:
| Name | Type | Description | 
|---|---|---|
$name | 
              string | The name of the element belonging to the module | 
$node | 
              DOMElement | The XML child from which to take the values for $name | 
Redefinition of:
| Method | Description | 
|---|---|
ezcFeedModule::parse() | 
            Parses the XML element $node and creates a feed element in the current module with name $name. |