2017 © Pedro Peláez
 

symfony-bundle amf-bundle

Rodchyn AMFBundle

image

rodchyn/amf-bundle

Rodchyn AMFBundle

  • Monday, July 16, 2012
  • by rodchyn
  • Repository
  • 1 Watchers
  • 1 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

========, (*1)

Overview

This bundle allows you to use AMF with the Symfony2 Framework. Main features include:, (*2)

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

Installation

Checkout a copy of the code::, (*3)

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

Then register the bundle with your kernel:, (*4)

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

Make sure that you also register the namespaces with the autoloader:, (*5)

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

Note: The serializer needs the [JMSSerializerBundle][1]., (*6)

Configuration

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

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, (*8)

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, (*9)

# 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

The Versions

16/07 2012

dev-master

9999999-dev

Rodchyn AMFBundle

  Sources   Download

The Requires

 

by Thomas Adam

amf