Skip to content

Instantly share code, notes, and snippets.

View florianpdf's full-sized avatar

Florian Grandjean florianpdf

View GitHub Profile
<?php
function square($horizontal, $vertical){
$str = '';
for ($i=1; $i <= $vertical; $i++) {
if ($i == 1 || $i == $horizontal){
$str .= stringFirst($horizontal);
}
else {
<?php
// src/UserBundle/DataFixtures/ORM/LoadUserData.php
// loading fixtures: php app/console doctrine:fixtures:load (--append)
namespace UserBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\Persistence\ObjectManager;
<?php
namespace WCS\CoavBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use WCS\CoavBundle\Entity\Review;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
<?php
namespace WCS\CoavBundle\Controller;
use WCS\CoavBundle\Entity\Review;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;
<?php
/**
* Class Planet
*/
class Planet implements PlanetInterface
{
/**
* Rotate the Planet and pass in the dark or in the day
<?php
namespace MyApp\Controllers;
use MyApp\Model\Repository\UserManager;
/**
* Class DefaultController
* @package MyApp\Controllers
*/
<img src="{{ modele.imageUrl | imagine_filter('my_thumb') }}" class="thumbs" alt="{{ modele.imageAlt }}"/>
-- MySQL dump 10.13 Distrib 5.7.15, for osx10.11 (x86_64)
--
-- Host: localhost Database: matchmypics
-- ------------------------------------------------------
-- Server version 5.7.15
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
<?php
namespace BLOGBundle\Twig;
class ImgSizeExtension extends \Twig_Extension
{
protected $param;
public function __construct($param)
{
{% extends '@TRMain/layout.html.twig' %}
{% block content %}
<section id="notification_ok">
<div class="row">
{% if eventsTrue is empty and eventsFalse is empty %}
<h1 class="title_section">Vous n'avez pas de cours planifié(s)</h1>
{% elseif eventsTrue is empty %}
<h1 class="title_section">Vous avez {{ eventsFalse|length }} cours en attente de validation</h1>
{% elseif eventsFalse is empty %}