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

Class: XML_SaxFilters_FilterMap

Source Location: /XML_SaxFilters-0.3.0/SaxFilters/FilterBuilder.php

Class Overview


Defines a map which is used to identify when an Filter should be created.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 105]
Defines a map which is used to identify when an Filter should be created.

Used by XML_SaxFilters_FilterBuilder to create an remove filters.
Note: so long as you confirm to the APIs of the isFilter and makeFilter methods in this class, expected by FilterBuilder, you can replace it with your own (allowing you to so custom stuff with the makeFilter method, for example)



[ Top ]


Class Variables

$attrs =  NULL

[line 134]

Array of XML tag attributes matching a filter
  • Var: (default = NULL)
  • Access: public

Type:   mixed


[ Top ]

$filterFile =  'PEAR.php'

[line 120]

Path and name of class file for filter to include

when FilterMap::makeFilter is called

  • Var: (default = 'PEAR.php') - make sure you replace it
  • Access: public

Type:   string


[ Top ]

$filterName =  'PEAR_Error'

[line 112]

Name of Filter class to create (subclass of AbstractFilter)
  • Var: (default = PEAR_Error) - make sure you replace it
  • Access: public

Type:   string


[ Top ]

$tag =

[line 127]

XML Element name that matches a filter
  • Access: public

Type:   string


[ Top ]



Method Detail

XML_SaxFilters_FilterMap (Constructor)   [line 136]

XML_SaxFilters_FilterMap XML_SaxFilters_FilterMap( $class, $tag, [ $attrs = NULL])


Parameters:

   $class   — 
   $tag   — 
   $attrs   — 

[ Top ]

isFilter   [line 153]

boolean isFilter( string $tag, [array $attrs = NULL])

Checks to see a given XML opening tag element maps to a filter.

Checks uses a case insensitive comparison of the tag name. If FilterMap was constructed with an array or attributes and the call to isFilter received an array as second argument, is performs a array_diff_assoc() to compare the array (which is case SENSITIVE)

  • Return: TRUE if element is a filter, FALSE if not
  • Access: public

Parameters:

string   $tag   —  XML element tag name
array   $attrs   —  (default = NULL) XML element attributes

[ Top ]

makeFilter   [line 176]

object either &makeFilter( )

Returns a filter object, based on the filterName and filterFile

properties of the FilterMap

  • Return: subclass of AbstractFilter or instance of PEAR_Error
  • Access: public

[ Top ]


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