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 Mon\Site\BlogBundle\Entity; | |
| use Doctrine\ORM\Mapping as ORM; | |
| /** | |
| * Class BaseEntity | |
| * | |
| * @ORM\MappedSuperclass |
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
| $datetime_transformer = new \Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToStringTransformer(null, null, 'Y-m-d H:i:s'); | |
| $timestamp_transformer = new \Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer(); | |
| # Transforming to Timestamp | |
| if (!($from_time instanceof \DateTime) && !is_numeric($from_time)) { | |
| $from_time = $datetime_transformer->reverseTransform($from_time); | |
| $from_time = $timestamp_transformer->transform($from_time); | |
| } elseif($from_time instanceof \DateTime) { | |
| $from_time = $timestamp_transformer->transform($from_time); | |
| } |
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 Symfony\Component\ClassLoader\ApcClassLoader; | |
| use Symfony\Component\HttpFoundation\Request; | |
| $loader = require_once __DIR__ . '/../app/bootstrap.php.cache'; | |
| if(!isset($_SERVER['APPLICATION_ENV'])) { | |
| $_SERVER['APPLICATION_ENV'] = (in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))) ? 'dev' : 'prod'; | |
| } |
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
| <?xml version="1.0"?> | |
| <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> | |
| <file source-language="en" datatype="plaintext" original="file.ext"> | |
| <body> | |
| <trans-unit id="1"> | |
| <source>global.hello</source> | |
| <target>Bonjour</target> | |
| </trans-unit> | |
| </body> | |
| </file> |
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 Formation\CoreBundle\Listener; | |
| use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
| use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
| use Symfony\Component\HttpKernel\KernelEvents; | |
| class LocaleListener implements EventSubscriberInterface | |
| { |
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
| {# | |
| This file is part of the Glit package. | |
| (c) William Pottier <[email protected]> | |
| For the full copyright and license information, please view the LICENSE | |
| file that was distributed with this source code. | |
| #} | |
| {% block form_widget %} | |
| {% spaceless %} |
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 Geekswire\Egames\SteamBundle\Manager; | |
| class L4D2ServerManager | |
| { | |
| /** | |
| * @var \SourceServer | |
| */ | |
| private $serverConnexion; |
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
| public function relativeDate($date) | |
| { | |
| $today = strtotime(date('M j, Y')); | |
| if ($date instanceof \DateTime) { | |
| $date = $date->getTimestamp(); | |
| } | |
| $reldays = ($date - $today) / 86400; |
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
| <div class="row-fluid"> | |
| <form action="" method="post"> | |
| <fieldset> | |
| <legend>{% trans %}Login{% endtrans %}</legend> | |
| <div class="control-group"> | |
| <label class="control-label" for="_username">{% trans %}Username :{% endtrans %}</label> | |
| <div class="controls"> | |
| <input type="text" name="_username" id="_username" value="{{ last_username }}"> |
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
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: amazon-resque | |
| # Required-Start: $all | |
| # Required-Stop: $all | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the amazon resque daemon | |
| # Description: starts amazon resque using start-stop-daemon |