0.2.2releasedAPIPage

API Page parser

Clone URLhttps://github.com/iwyg/apipage.git

Add as a submodulegit submodule add https://github.com/iwyg/apipage.git extensions/apipage --recursive

Compatibility

2.x.x2.1.x2.2.x2.3.x2.4.x2.5.x2.6.x2.7.02.7.12.7.22.7.32.7.42.7.52.7.62.7.72.7.82.7.92.7.10
NoNoNo0.2.2NoNoNoNoNoNoNoNoNoNoNoNoNoNo. Soon?

Readme

Synopsis

Easily generate api pages with Symphony CMS.

Build Status

Dependencies

  • php >= 5.3.6
  • all other dependencies should already be met by Symphony CMS

Usage

  • Install as usual.
  • set default format and format url parameter in System/Preferences
  • set pagetype to API (do not set any pagetype other then API when using the content type mappings extension)

  • set your template's output format to xml, e.g.:

```xml
<?xml version="1.0" encoding="UTF-8"?>

<xsl:template match="/">
    <response> <!-- do your transformations here --></response>
</xsl:template>

```

  • do your data transformation as you would usually do.

URL Parameter

  • format: specify output format (json|jsonp|xml)
  • callback: specify a callback name for jsonp requests (format: json)

FAQ

  • Q: why no php 5.2?
  • A: Brace yourself, php 5.5 is comming.
  • Q: I can do all this using a xml to json stylesheet. So why using this extension?
  • A: Sure you can. The downside of doing so is, that all these stylesheets are a bit restricted and perform expensive string operations. The extensions XMLtoJSON parser uses the php C extension SimpleXML, which is much faster. It's reliable and it's tested.

Version history

Symphony 2.3.0 to 2.3.x

  - bugfix
	  - please re-enable extension to fully work (delegate handler name changed)
	

Symphony 2.3.0 to 2.3.x

  - add template helper
	

Symphony 2.3.0 to 2.3.x

  - node values are now treated as their inteted type
	

Symphony 2.3.0 to 2.3.x

  • allow content length header to be disabled
  • content length header disabled for debugger

Symphony 2.3.0 to 2.3.x

  • specify jsonp callback in url parameter
  • add Content-length header

Symphony 2.3.0 to 2.3.x

  • Fixes: only override default setting when configured

Symphony 2.3.0 to 2.3.x

  • add jsonp output
  • output formats can now be triggered by HTTP Accept header (Accept: application/json, etc)

Symphony 2.3.0 to 2.3.x

  • various fixes
  • fix empty nodes
  • fix nodes with mixed content (text and childnodes)
  • textnodes with attributes no longer return node: {@attributes: {}, value: text} but node: {@attributes: {}, text: text}

Symphony 2.3.0 to 2.3.x

  • bugfix

Symphony 2.3.0 to 2.3.x

  • parser error

Symphony 2.3.0 to 2.3.x

  • added installation routine

Symphony 2.3.0 to 2.3.x

  • added test

Symphony 2.3.0 to 2.3.x

  • fix parser

Symphony 2.3.0 to 2.3.x

  • initial release