init without trunk
This commit is contained in:
parent
ed24ac4994
commit
bb809e7233
14652 changed files with 177862 additions and 94817 deletions
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony framework.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* This source file is subject to the MIT license that is bundled
|
||||
* with this source code in the file LICENSE.
|
||||
*/
|
||||
|
||||
namespace Tests\Fixtures\ActionArgumentsBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class ActionArgumentsBundle extends Bundle
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Fixtures\ActionArgumentsBundle\Controller;
|
||||
|
||||
use Psr\Http\Message\MessageInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* @Route("/nullable-arguments")
|
||||
*/
|
||||
class NullableArgumentsController
|
||||
{
|
||||
/**
|
||||
* @Route("/invoke/")
|
||||
*/
|
||||
public function __invoke(RequestInterface $request, MessageInterface $message, ServerRequestInterface $serverRequest)
|
||||
{
|
||||
return new Response('<html><body>ok</body></html>');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/with-default")
|
||||
*/
|
||||
public function withDefaultAction(string $d = null)
|
||||
{
|
||||
return new Response(null === $d ? 'yes' : 'no');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/without-default")
|
||||
*/
|
||||
public function withoutDefaultAction(string $d)
|
||||
{
|
||||
return new Response(null === $d ? 'yes' : 'no');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/nullable")
|
||||
*/
|
||||
public function nullableAction(?string $d)
|
||||
{
|
||||
return new Response(null === $d ? 'yes' : 'no');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue