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
{ | |
"name": "symfony/framework-standard-edition", | |
"license": "MIT", | |
"type": "project", | |
"description": "The \"Symfony Standard Edition\" distribution", | |
"autoload": { | |
"psr-0": { "": "src/", "SymfonyStandard": "app/" } | |
}, | |
"require": { | |
"php": ">=5.3.3", |
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 CellCare\SiteBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpFoundation\Response; | |
class CmsController extends Controller | |
{ | |
public function dynamicAction() |
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 SiteBundle\Controller; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |
class CmsController implements ContainerAwareInterface |
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 Foo\SiteBundle\Controller; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Component\DependencyInjection\ContainerAwareInterface; | |
class CmsController implements ContainerAwareInterface |
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 | |
$errors = array(); | |
foreach (array('email', 'name', 'age', 'occupation') as $key) { | |
if (!isset($_GET[$key]) || empty($_GET[$key])) { | |
$errors[] = "You need to fill in $key"; | |
} | |
} |
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
{ | |
"repositories": { | |
"doctrine-fixtures-bundle": { | |
"name": "doctrine/doctrine-fixtures-bundle", | |
"type": "symfony-bundle", | |
"version": "2.0.0", | |
"require": { | |
"php": ">=5.3.2", | |
"symfony/symfony": ">=2.0" | |
}, |
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
{{ Form::text('username', 'null', array('placeholder' => 'hold') }} |
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 | |
public function registerEngineResolver() | |
{ | |
$this->app->bindShared('view.engine.resolver', function($app) | |
{ | |
$resolver = new EngineResolver; | |
// Next we will register the various engines with the resolver so that the | |
// environment can resolve the engines it needs for various views based |
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 | |
$formatter = new NumberFormatter('en_AU', NumberFormatter::SPELLOUT); | |
$formatter->setTextAttribute(NumberFormatter::DEFAULT_RULESET, "%spellout-ordinal"); | |
for ($i = 1; $i <= 5; $i++) { | |
echo $formatter->format($i) . "\n"; | |
} |
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
g:vdebug_options['path_maps'] = {"/var/www/cc": "/Users/trq/src/clients/cc/site"} | |
autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab | |
autocmd FileType htmljinja setlocal ts=2 sts=2 sw=2 expandtab | |
autocmd FileType css setlocal ts=2 sts=2 sw=2 expandtab | |
autocmd FileType javascript setlocal ts=2 sts=2 sw=2 expandtab | |
autocmd FileType php setlocal ts=4 sts=4 sw=4 expandtab |