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 MyProject\MyBundle\Controller; | |
| use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
| use Symfony\Component\HttpFoundation\Response; | |
| class ImageController extends Controller | |
| { | |
| public function proxyAction($url) |
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
| { | |
| 0: { | |
| code: 200, | |
| headers: [ | |
| { | |
| name: "Content-Type", | |
| value: "application/json", | |
| }, | |
| { | |
| name: "ETag", |
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 | |
| $fb = new Facebook(array('appId' => ..., 'secret' => ..., 'cookie' => true)); | |
| $queries = array( | |
| array('method' => 'GET', 'relative_url' => '/8882845892'), | |
| array('method' => 'GET', 'relative_url' => '/67226614422'), | |
| array('method' => 'GET', 'relative_url' => '/140959058191'), | |
| ); |
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 | |
| $fb = new Facebook(array('appId' => ..., 'secret' => ..., 'cookie' => true)); | |
| $obj_1 = $fb->api('/8882845892'); | |
| $obj_2 = $fb->api('/67226614422'); | |
| $obj_3 = $fb->api('/140959058191'); |
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
| 21 # FacebookBundle Configuration | |
| 22 fos_facebook: | |
| 23 file: %kernel.root_dir%/../vendor/facebook/src/facebook.php | |
| 24 alias: facebook | |
| 25 app_id: xxxxx | |
| 26 secret: xxxxx | |
| 27 cookie: true | |
| 28 | |
| 29 # Security Configuration | |
| 30 security: |
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
| <span>{{ mydate|date('X') }}</span> |
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 Caefer; | |
| use Caefer\WeekAhead; | |
| $qb = $em->createQueryBuilder(); | |
| $qb->add('select', 'x') | |
| ->add('from', 'Caefer\Entity\Experiment x') | |
| ->add('where', 'x.date = :date') |
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 | |
| use Caefer\WeekAhead; | |
| $w = new WeekAhead('today'); | |
| echo $w->format('Y-m-d').PHP_EOL; | |
| $w = new WeekAhead('tomorrow'); | |
| echo $w->format('Y-m-d').PHP_EOL; |
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 Caefer; | |
| class WeekAhead extends \DateTime | |
| { | |
| protected $terms = array( | |
| 'today' => 'now', | |
| 'tomorrow' => '+1 days', | |
| ); |
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 | |
| // ... | |
| $qb->add('where', 'x.date = :date') | |
| ->setParameter('date', new \DateTime('+2 days'), \Doctrine\DBAL\Types\Type::DATETIME); | |
| // ... |