All Projects → jakzal → ParamConverterBundle

jakzal / ParamConverterBundle

Licence: MIT license
This bundle provides additional param converters for Symfony.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to ParamConverterBundle

KtwDatabaseMenuBundle
Symfony bundle for extending KnpMenu to store menu items in a database.
Stars: ✭ 12 (-25%)
Mutual labels:  bundle, symfony-bundle
SonataAdminSearchBundle
[Abandoned] Implement Search Engine (ElasticSearch) inside Sonata Admin
Stars: ✭ 19 (+18.75%)
Mutual labels:  bundle, symfony-bundle
SonataFormatterBundle
Symfony SonataFormatterBundle
Stars: ✭ 78 (+387.5%)
Mutual labels:  bundle, symfony-bundle
guzzle6-bundle
Integrates Guzzle 6 into your Symfony application
Stars: ✭ 11 (-31.25%)
Mutual labels:  bundle, symfony-bundle
supervisor-bundle
Easily update your @Supervisor configuration by using annotations in Symfony commands.
Stars: ✭ 35 (+118.75%)
Mutual labels:  bundle, symfony-bundle
FkrCssURLRewriteBundle
A small assetic filter for symfony to fix all url paths at css documents to correct urls
Stars: ✭ 33 (+106.25%)
Mutual labels:  bundle, symfony-bundle
AtoumBundle
This bundle provides a simple integration of atoum into Symfony 2.
Stars: ✭ 44 (+175%)
Mutual labels:  bundle, symfony-bundle
socketio
No description or website provided.
Stars: ✭ 23 (+43.75%)
Mutual labels:  bundle, symfony-bundle
vite-bundle
Integration with your Symfony app & Vite
Stars: ✭ 56 (+250%)
Mutual labels:  bundle, symfony-bundle
LexikMailerBundle
This Symfony2 bundle allow you to manage some HTML email templates stored in your database. Templates are written with Twig and use I18N. You can also create some layouts to decorate your email.
Stars: ✭ 81 (+406.25%)
Mutual labels:  bundle, symfony-bundle
lexik-jose-bridge
An Encoder for the LexikJWTAuthenticationBundle that uses web-token/jwt-framework
Stars: ✭ 27 (+68.75%)
Mutual labels:  bundle, symfony-bundle
VreshTwilioBundle
A Symfony2 wrapper for the official SDK provided by Twilio.
Stars: ✭ 45 (+181.25%)
Mutual labels:  bundle, symfony-bundle
wordpress-bundle
Use Wordpress and Symfony together using a Symfony bundle
Stars: ✭ 30 (+87.5%)
Mutual labels:  bundle, symfony-bundle
ExpandedCollectionBundle
Symfony bundle for render entity collections as a selectable expanded list.
Stars: ✭ 13 (-18.75%)
Mutual labels:  bundle, symfony-bundle
OpcacheBundle
Displays the PHP OPcache status in the Symfony profiler toolbar.
Stars: ✭ 21 (+31.25%)
Mutual labels:  bundle, symfony-bundle
DynamicParametersBundle
[UNMAINTAINED] Runtime retrieval of parameters from environment variables for Symfony
Stars: ✭ 42 (+162.5%)
Mutual labels:  bundle, symfony-bundle
awsBundle
Symfony AWS Bundle (supports Symfony 2, 3 and 4)
Stars: ✭ 18 (+12.5%)
Mutual labels:  bundle, symfony-bundle
BeelabTagBundle
🏷 A simple implementation of tags for Symfony and Doctrine ORM
Stars: ✭ 45 (+181.25%)
Mutual labels:  bundle, symfony-bundle
SinchBundle
📦 Provides integration with Sinch.com SMS API.
Stars: ✭ 12 (-25%)
Mutual labels:  bundle, symfony-bundle
GuzzleBundleOAuth2Plugin
OAuth2 Plugin for GuzzleBundle
Stars: ✭ 13 (-18.75%)
Mutual labels:  bundle, symfony-bundle

Param Converter Bundle

This bundle provides additional param converters for Symfony.

Scrutinizer Code Quality Build Status

Since argument resolvers and service arguments were introduced in Symfony 3.3, the param converter provided by this bundle is redundant. We can achieve pretty much the same by injecting services directly to controller actions.

Installation

This bundle requires:

  • PHP ^7.0
  • sensio/framework-extra-bundle ~3.0

The easiest way to install it is to use Composer:

$ composer require zalas/param-converter-bundle:^1.0

Service Param Converter

The service param converter calls a configured service to convert a request attribute to an object.

Options:

  • service - a service id
  • method - a method name to be called on the service
  • arguments - list of request attributes to be passed as method call arguments

Example:

<?php

namespace AppBundle\Controller;

use AppBundle\Site\Visitor;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;

class DemoController
{
    /**
     * @Route("/hello/{name}")
     * @ParamConverter(
     *     "visitor",
     *     converter="service",
     *     options={
     *         "service": "visitor_repository",
     *         "method": "findByName",
     *         "arguments": {"name"}
     *     }
     * )
     */
    public function indexAction(Visitor $visitor)
    {
        return new Response('Hello '.$visitor->getName());
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].