Skip to content

Instantly share code, notes, and snippets.

$router = $this->get('router');
// You can look what routes defined
//dump($router->getRouteCollection()->all());
if (array_key_exists('your_route_name', $router->getRouteCollection()->all())) {
...special code...
} else {
...other code...
}
build_settings:
clone_depth: 150
ignore:
- "vendor"
- "tests"
- "PhpStormOpener"
- "bin"
- "chromephp"
- "web"
- "app"
@toolpixx
toolpixx / phpcs
Last active August 29, 2015 14:13 — forked from dajoho/phpcs
sudo cp /private/etc/php.ini.default /private/etc/php.ini;
sudo php /usr/lib/php/install-pear-nozlib.phar;
pear config-set php_ini /private/etc/php.ini;
pecl config-set php_ini /private/etc/php.ini;
sudo pear upgrade-all;
sudo pear install PHP_CodeSniffer;
----
nano /private/etc/php.ini;
include_path Zeile einkommentieren & umändern in:

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should be using:

@toolpixx
toolpixx / EnquiryController.php
Created January 19, 2015 15:12
Simple move attachment with symfony2
...other stuff before....
/**
*
* use Symfony\Component\HttpFoundation\File\UploadedFile as UploadedFile;
*
* $message is instanceof \Swift_Message::newInstance()
* $enquiry is instanceof EnquiryEntity
* $enquiry->getAttachment() is the file-attribute for upload
*
*/
@toolpixx
toolpixx / EnquiryController.php
Last active February 27, 2019 18:50
Simple attachment with symfony2 and swiftmailer without move attachment before...
...other stuff before....
/**
*
* use Symfony\Component\HttpFoundation\File\UploadedFile as UploadedFile;
*
* $message is instanceof \Swift_Message::newInstance()
* $enquiry is instanceof EnquiryEntity
* $enquiry->getAttachment() is the file-attribute for upload
*
*/