XML_Transformer
[ class tree: XML_Transformer ] [ index: XML_Transformer ] [ all elements ]

Class: XML_Transformer_Namespace_Anchor

Source Location: /XML_Transformer-1.1.2/XML/Transformer/Namespace/Anchor.php

Class Overview

XML_Transformer_Namespace
   |
   --XML_Transformer_Namespace_Anchor

Handler for the Anchor Namespace.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: XML_Transformer_Namespace

XML_Transformer_Namespace::endElement()
Wrapper for endElement handler.
XML_Transformer_Namespace::getLock()
Lock all other namespace handlers.
XML_Transformer_Namespace::initObserver()
Called by XML_Transformer at initialization time.
XML_Transformer_Namespace::releaseLock()
Releases a lock.
XML_Transformer_Namespace::startElement()
Wrapper for startElement handler.

Class Details

[line 66]
Handler for the Anchor Namespace.

This namespace maintains an anchor database, a database of named links. These links can be referenced using the iref tag within this namespace.

This allows for a central storage of links, changing links need only be changed in one locations. Designers can reference the link through the symbolic name.

Example:

  1.  <?php
  2.  $t->overloadNamespace("anchor"$n);
  3.  
  4.        array(
  5.          "pear" => array(
  6.            "href"  => "http://pear.php.net",
  7.            "title" => "PEAR Homepage"
  8.          )
  9.        )
  10.  );
  11.  ?>
  12.  <p>The <anchor:iref iref="pear">PEAR Homepage</anchor:iref> is now online.</p>

Output:

  1.  <p>The <a href="http://www.pear.net" title="PEAR Homepage">PEAR
  2.  Homepage</a> is now online.</p>



[ Top ]


Class Variables

$defaultNamespacePrefix =  'anchor'

[line 73]

  • Access: public

Type:   boolean
Overrides:   Array


[ Top ]



Method Detail

addItem   [line 126]

boolean addItem( string $item, array $attr)

Add an item $item with the attributes $attr to the link database array.
  • Access: public

Parameters:

string   $item   — 
array   $attr   — 

[ Top ]

dropItem   [line 142]

boolean dropItem( string $item)

Drop an item $item drom the link database array.
  • Access: public

Parameters:

string   $item   — 

[ Top ]

end_iref   [line 191]

string end_iref( string $cdata)

  • Access: public

Parameters:

string   $cdata   — 

[ Top ]

end_link   [line 268]

string end_link( string $cdata)

  • Access: public

Parameters:

string   $cdata   — 

[ Top ]

end_random   [line 228]

string end_random( string $cdata)

  • Access: public

Parameters:

string   $cdata   — 

[ Top ]

getDatabase   [line 111]

array getDatabase( )

Return the link database array.
  • Access: public

[ Top ]

getItem   [line 161]

mixed getItem( string $item)

Get an item $item from the link database array.
  • Access: public

Parameters:

string   $item   — 

[ Top ]

setDatabase   [line 96]

boolean setDatabase( array $db)

Install a complete link database array.
  • Access: public

Parameters:

array   $db   — 

[ Top ]

start_iref   [line 177]

string start_iref( array $attributes)

  • Access: public

Parameters:

array   $attributes   — 

[ Top ]

start_link   [line 249]

string start_link( array $attributes)

  • Access: public

Parameters:

array   $attributes   — 

[ Top ]

start_random   [line 216]

string start_random( array $attributes)

  • Access: public

Parameters:

array   $attributes   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:48:09 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.