This file contains hidden or 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
PS1='\[\033[0;37m\][\t]\[\033[0;32m\][\u]\[\033[31m\][\h]`git branch 2>/dev/null | grep \* | head -1 | sed "s/\* //g" | awk "{ print \"[ \"\\\$1 \" ]\" }"` \[\033[1;33m\]\w\a\[\033[0m\]\n\$ ' |
This file contains hidden or 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 | |
// some code... | |
/** | |
* Query Builder to get all users with age > $age | |
* | |
* @param int $age | |
* | |
* @return Doctrine\ORM\QueryBuilder $qb |
This file contains hidden or 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
01 - Always use Composer to install Symfony | |
test: $ composer --version | |
install: $ curl -sS https:://getcomposer.org/installer | php | |
$ sudo mv composer.phar /usr/local/bin/composer | |
02 - Creating a application | |
$ cd projects/ | |
$ composer create-project symfony/framework-standard-edition blog/ | |
$ cd blog/ |
This file contains hidden or 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 | |
//... some code | |
public function findByFieldIntoInterval(\DateTime $earlyDate, \DateTime $lateDate) | |
{ | |
$qb = $this->createQueryBuilder('e'); | |
$qb->where($qb->expr()->between('e.field', ':earlyDate', ':lateDate')); | |
This file contains hidden or 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 HunterBundle\Command; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Formatter\OutputFormatterStyle; |
OlderNewer