This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
directory: "src/Acme/Bundle/DemoBundle/Resources/public/vendor" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use \Symfony\Component\Form\FormInterface; | |
use \Symfony\Component\HttpFoundation\Request; | |
class FormSet | |
{ | |
/** | |
* @var SplObjectStorage|FormInterface[] | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @param Pagerfanta $paginatedResults | |
* @return array|null | |
*/ | |
protected function getFacetsFromPaginatedResults(Pagerfanta $paginatedResults, $offset, $limit) | |
{ | |
$paginatedAdapter = $paginatedResults->getAdapter(); | |
$adapter = new \ReflectionProperty($paginatedAdapter, 'adapter'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\CommandBus; | |
use Acme\CommandInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
class CommandBus implements CommandBusInterface | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class VowelCounter { | |
function count($string) { | |
return array_reduce(str_split($string), function($vowelCount, $str) { return $vowelCount += in_array($str, ['a', 'e', 'i', 'o', 'u']);}); | |
} | |
} | |
$vc = new VowelCounter(); | |
echo $vc->count('php uk conference'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$input = <<<INPUT | |
()()(()()()(()()((()((()))((()((((()()((((()))()((((())(((((((()(((((((((()(((())(()()(()((()()(()(())(()((((()((()()()((((())((((((()(()(((()())(()((((()))())(())(()(()()))))))))((((((((((((()())()())())(())))(((()()()((((()(((()(()(()()(()(()()(()(((((((())(())(())())))((()())()((((()()((()))(((()()()())))(())))((((())(((()())(())(()))(()((((()())))())((()(())(((()((((()((()(())())))((()))()()(()(()))))((((((((()())((((()()((((()(()())(((((()(()())()))())(((()))()(()(()(()((((()(())(()))(((((()()(()()()(()(((())())(((()()(()()))(((()()(((())())(()(())())()()(())()()()((()(((()(())((()()((())()))((()()))((()()())((((()(()()(()(((()))()(()))))((()(((()()()))(()(((())()(()((()())(()(()()(()())(())()(((()(()())()((((()((()))))())()))((()()()()(())()())()()()((((()))))(()(((()()(((((((())()))()((((()((())()(()())(())()))(()(()())(((((((())))(((()))())))))()))())((())(()()((())()())()))))()((()()())(())((())((((()())())()()()(((()))())))()()))())(()()()(()((((((()()))())()))()(((()(((())( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Composer autoloader | |
$loader = require __DIR__ . '/../vendor/autoload.php'; | |
// Legacy config which includes legacy autoloader stuff | |
require_once __DIR__ . '/../html/config.php'; | |
// Legacy bootstrapping code wrapped in a class implementing HttpKernelInterface to make it stackable | |
require __DIR__ . '/../html/Bootstrap.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme; | |
use application\App; | |
use Symfony\Bundle\FrameworkBundle\FrameworkBundle; | |
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; | |
use Symfony\Bundle\SecurityBundle\SecurityBundle; | |
use Symfony\Bundle\TwigBundle\TwigBundle; | |
use Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\Listener; | |
use Acme\Language\LanguageInterface; | |
use Acme\Language\LanguageSessionInterface; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
final class LanguageListener | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\Authentication; | |
use Acme\Avatar\AvatarInterface; | |
use Symfony\Component\Security\Core\User\UserInterface; | |
class User implements UserInterface | |
{ | |
// ... |