Skip to content

Instantly share code, notes, and snippets.

View piotrpasich's full-sized avatar

Piotr Pasich piotrpasich

View GitHub Profile
"repositories": [
{
"type": "package",
"package": {
"name": "jquery/jquery",
"version": "1.9.1",
"dist": {
"url": "http://code.jquery.com/jquery-1.9.1.js",
"type": "file"
}
app/console cache:clear;
app/console cache:clear -e=prod;
app/console assetic:dump;
app/console assetic:dump -e=prod;
app/console assets:install web/;
app/console assets:install web/ -e=prod;
{# app/Resources/view/base.html.twig #}
{% extends 'XsolveBootstrapCrudBundle::examplelayout.html.twig' %}
<?php
class AppKernel extends Kernel
{
...
public function registerBundles()
{
$bundles = array(
...
new Bc\Bundle\BootstrapBundle\BcBootstrapBundle(),
new Xsolve\BootstrapCrudBundle\XsolveBootstrapCrudBundle(),
{
"require": {
"xsolve-pl/xsolve-bootstrap-crud-bundle": "dev-master"
},
"repositories": [
{
"type": "package",
"package": {
"name": "jquery/jquery",
"version": "1.9.1",
<?php
return $this->createQueryBuilder('p')
->addSelect("MATCH_AGAINST (p.name, p.country, p.street, p.postal, p.city, p.state, :address 'IN NATURAL MODE') as score")
->add('where', 'MATCH_AGAINST(p.name, p.country, p.street, p.postal, p.city, p.state, :address) > 0.8')
->setParameter('address', $address)
->getQuery()
->getResult();
<?php
namespace Xsolve\AcmeBundle\Extension\Doctrine;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
/**
* @example by https://gist.github.com/1234419 Jérémy Hubert
* "MATCH_AGAINST" "(" {StateFieldPathExpression ","}* InParameter {Literal}? ")"
orm:
auto_generate_proxy_classes: %kernel.debug%
auto_mapping: true
dql:
string_functions:
soundex: Xsolve\AcmeBundle\DQL\SoundexFunction
<?php
namespace Xsolve\AcmeBundle\DQL;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\Lexer;
/**
* SoundexFunction ::= "SOUNDEX" "(" StringPrimary ")"
*/
<?php
namespace Xsolve\TestBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;