Giter Site home page Giter Site logo

apipage's Introduction

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.

apipage's People

Contributors

alexbirukov avatar iwyg avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.