Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <?php | |
| abstract class BaseModelManager { | |
| protected $em; | |
| protected $class; | |
| protected $repository; | |
| protected $container; | |
| /** | |
| * Constructor. |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <?php | |
| require_once __DIR__ . '/../lib/vendor/Silex/silex.phar'; | |
| $app = new Silex\Application(); | |
| $app['debug'] = true; | |
| // Registering Symfony\Yaml and Symfony\Config | |
| $app['autoloader']->registerNamespace('Symfony', __DIR__.'/../lib/vendor/symfony/src'); |
For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.
There is also reference documentation in the works.
CSS Systems
| {% block collection_widget %} | |
| {% spaceless %} | |
| <div class="collection"> | |
| {% if prototype is defined %} | |
| {% set attr = attr|merge({'data-prototype': block('collection_item_widget') }) %} | |
| {% endif %} | |
| <div {{ block('widget_container_attributes') }}> | |
| {{ form_errors(form) }} | |
| <ul> | |
| {% for rows in form %} |
| # ======================================== | |
| # Testing n-gram analysis in ElasticSearch | |
| # ======================================== | |
| curl -X DELETE localhost:9200/ngram_test | |
| curl -X PUT localhost:9200/ngram_test -d ' | |
| { | |
| "settings" : { | |
| "index" : { | |
| "analysis" : { |
| <?php | |
| use Symfony\Component\HttpFoundation\File\File; | |
| use Symfony\Component\HttpFoundation\File\UploadedFile; | |
| /** | |
| * @Entity | |
| */ | |
| class Document | |
| { |