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

Class: FluentDOMLoaderStringJSON

Source Location: /FluentDOM/Loader/StringJSON.php

Class Overview


Load FluentDOM from JSON encoded string


Author(s):

Implements interfaces:

Variables

Methods



Class Details

[line 25]
Load FluentDOM from JSON encoded string



Tags:



[ Top ]


Class Variables

$jsonErrors = array(
    -1 => 'Unknown error has occurred',
    0 => 'No error has occurred',
    1 => 'The maximum stack depth has been exceeded',
    3 => 'Control character error, possibly incorrectly encoded',
    4 => 'Syntax error',
  )

[line 31]

JSON errors



Tags:

access:  private

Type:   array


[ Top ]

$typeAttributes =  FALSE

[line 43]

Add variable type attributes to the element nodes



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method load [line 52]

array(DOMDocument,DOMNode)|FALSE load( string $source, string $contentType)

Load DOMDocument from local XML file



Tags:

access:  public



Implementation of:
FluentDOMLoader::load()
load FluentDOM document data from a source

Parameters:

string   $source   json encoded content
string   $contentType  

[ Top ]

method _addElement [line 110]

void _addElement( DOMElement $parentNode, string $tagName)

Add new element, sanitize tag name if nessesary



Tags:

access:  private


Parameters:

DOMElement   $parentNode  
string   $tagName  

[ Top ]

method _toDom [line 79]

void _toDom( DOMElement $parentNode, mixed $current, [integer $maxDepth = 100])

Convert a JSON object structure to a DOMDocument



Tags:

access:  private


Parameters:

DOMElement   $parentNode  
mixed   $current  
integer   $maxDepth   simple recursion protection

[ Top ]


Documentation generated on Thu, 09 Sep 2010 01:00:56 +0200 by phpDocumentor 1.4.3