GithubHelp home page GithubHelp logo

amfbundle's Introduction

======== Overview

This bundle allows you to use AMF with the Symfony2 Framework. Main features include:

  • handle incoming AMF requests and routing it to the configured services.
  • serializer to convert classes to virtual objects with the JMSSerializerBundle

Installation

Checkout a copy of the code::

git submodule add https://github.com/tecbot/AMFBundle.git src/Tecbot/AMFBundle

Then register the bundle with your kernel:

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new JMS\AMFBundle\TecbotAMFBundle(),
    // ...
);

Make sure that you also register the namespaces with the autoloader:

// app/autoload.php
$loader->registerNamespaces(array(
    // ...
    'Tecbot'              => __DIR__.'/../vendor/bundles',
    // ...
));

Note: The serializer needs the JMSSerializerBundle.

Configuration

Below is the default configuration, you don't need to change it unless it doesn't suit your needs:

tecbot_amf:
    use_serialization: false

Usage

  • All mapped services must be added to the folder "Amf" in your bundle (e.g Foo\BarBundle\Amf\FooService).
  • All public methods wich you want to access from Amf needs the "Action" suffix like controllers.

Configuring services and class mappings

tecbot_amf:
    services: # Services
        FooService: FooBarBundle:Foo # Map FooService (Actionscript alias) to Foo\BarBundle\Amf\Foo class
    mapping: # Class mapping. Map FooClassVO (Actionscript alias) to Foo\BarBundle\VO\FooClassVO
        FooClassVO: Foo\BarBundle\VO\FooClassVO

Add routing to the gateway controller

# path is "/gateway"
_tecbot_amf:
    resource: "@TecbotAMFBundle/Resources/config/routing.yml"

# or when you want a another path
amf:
    pattern: /amf
    defaults: { _controller: tecbot_amf.controller.gateway:gatewayAction }

Example App

amfbundle's People

Contributors

rodchyn avatar benjamindulau avatar

Stargazers

 avatar

Watchers

 avatar James Cloos 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.