Author:
iwyg
Version:
0.1.8
Released:
8 February 2013
Category:
Other

Description

Synopsis

Easily generate api pages with Symphony CMS.

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 version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" />
    
        <xsl:template match="/">
            <response> <!-- do your transformations here --></response>
        </xsl:template>
    </xsl:stylesheet>
    
  • do your data transformation as you would usually do.

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.

TODOS

  • make XMLtoJSON parser exchangable
  • add more output formats like yml, python, etc.

Repository

https://github.com/iwyg/apipage

Discuss this Extension

Compatibility

2.7.10 Unsure
2.7.9 Unsure
2.7.8 Unsure
2.7.7 Unsure
2.7.6 Unsure
2.7.5 Unsure
2.7.4 Unsure
2.7.3 Unsure
2.7.2 Unsure
2.7.1 Unsure
2.7.0 Unsure
2.6.11 Unsure
2.6.10 Unsure
2.6.9 Unsure
2.6.8 Unsure
2.6.7 Unsure
2.6.6 Unsure
2.6.5 Unsure
2.6.4 Unsure
2.5.4 Unsure

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details