Skip to content

Instantly share code, notes, and snippets.

<?php
namespace BX\AppBundle\Controller;
/**
* @Route("/item")
*/
class DefaultController extends Controller {
/**
* @Route("/new",name="item_new")
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
@dextervip
dextervip / gist:5614992
Created May 20, 2013 19:56
Criando um bundle
C:\htdocs\smileflame>php app\console
Symfony version 2.3.0-RC1 - app/dev/debug
Usage:
[options] command [arguments]
Options:
--help -h Display this help message.
--quiet -q Do not output any message.
<?php
namespace Ideiah\GestaoQuadra\ClienteBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Ideiah\GestaoQuadra\AgendaBundle\Entity\Solicitacao;
use Ideiah\GestaoQuadra\AgendaBundle\Entity\Horario;
use Symfony\Component\Validator\Constraints as Assert;
package com.activiti.forms;
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd">
<import resource="activiti-standalone-context.xml" />
@dextervip
dextervip / gist:5062020
Created March 1, 2013 02:21
Bad formatting and indentations for twig files
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('bootstrap/css/bootstrap.css')}}" />
<link rel="stylesheet" href="{{ asset('bootstrap/css/bootstrap-responsive.css')}}" />
<style>
body{
public class Car {
/**
* Diz que a variavel não pode ser nula
*/
@NotNull
private String manufacturer;
/**
* Diz que a variavel não pode ser nula e o tamanho tem que ser maior ou igual 2 e no maximo 14
Port 8080
BindAddress 0.0.0.0
MaxClients 10
MaxBandwidth 50000
NoDaemon
<Feed webcam.ffm>
file /tmp/webcam.ffm
FileMaxSize 10M
</Feed>
@dextervip
dextervip / ActivitiService.php
Created November 9, 2012 04:18 — forked from lucassouza1/ActivitiService.php
Activiti Rest Client PHP
<?php
class ActivitiService{
const BASE_URL = 'http://localhost:8080/activiti-rest/service/';
const ADMIN_USERNAME = 'kermit';
private $_services = array(
'processDefinitions' => 'process-definitions',
'processDefinition' => 'process-definition/',