Skip to content

Instantly share code, notes, and snippets.

View tarlepp's full-sized avatar
💭
örrr

Tarmo Leppänen tarlepp

💭
örrr
  • Pinja
  • Jyväskylä, Finland
  • 12:14 (UTC +02:00)
View GitHub Profile
<?php
namespace Home\PageBundle\Handler;
use Symfony\Component\Form\Form;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
class BoxHandler
{
parameters:
class: Home\PageBundle\Entity\Box
services:
box_form:
class: Symfony\Component\Form\Form
factory: ['@form.factory', create]
arguments:
- Home\PageBundle\Form\BoxType
<?php
class FooController
{
public function indexAction(Request $request, UserData $userDataService): Response
{
$username = 'someuser';
$foo = $userDataService->checkUser($username);
@tarlepp
tarlepp / README.md
Last active August 27, 2017 15:00 — forked from gaby-de-wilde/README.md
Even Shorter Syndication [ESS] Node.js module

The module returns the ESS and has 2 arguments:

1 - the link to the RSS or Atom feed described. 2 - An array of objects formatted like this:

[
  { pubDate: 1503674340000, title: "hello world"},
  { pubDate: 1503674220000, title: "foo"        },
  { pubDate: 1503674160000, title: "bar"        }
# you can read more about security in the related section of the documentation
# http://symfony.com/doc/current/book/security.html
security:
# http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
providers:
our_db_provider:
entity:
class: GASUserBundle:User
property: username
#index:
# path: /
# controller: App\Controller\DefaultController::index
logout:
path: /logout
<?php
namespace AppBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class OverrideServiceCompilerPass implements CompilerPassInterface
{
private $environment;
<?php
namespace App\Controller;
use App\UseCases\UserManagement;
use App\UseCases\UserManagementInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class UserManagementController extends AbstractController