This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Behat\Mink\Driver; | |
use Symfony\Component\BrowserKit\Client, | |
Symfony\Component\BrowserKit\Cookie, | |
Symfony\Component\BrowserKit\Response, | |
Symfony\Component\DomCrawler\Crawler, | |
Symfony\Component\DomCrawler\Form, | |
Symfony\Component\DomCrawler\Field, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# After finalizing update: | |
after "deploy:finalize_update" do | |
if update_vendors | |
# share the children first (to get the vendor symlink) | |
deploy.share_childs | |
vendors_mode.chomp # To remove trailing whiteline | |
case vendors_mode | |
when "upgrade" then symfony.vendors.upgrade | |
when "install" then symfony.vendors.install | |
when "reinstall" then symfony.vendors.reinstall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1165430` | |
mkdir -p /Volumes/ramdisk/symfony/logs | |
mkdir -p /Volumes/ramdisk/symfony/cache | |
sudo chmod +a "ftassi allow delete,write,append,file_inherit,directory_inherit" /Volumes/ramdisk/symfony/cache /Volumes/ramdisk/symfony/logs | |
mkdir -p /Volumes/ramdisk/symfony/cache/annotations | |
mkdir -p /Volumes/ramdisk/symfony/cache/doctrine/orm/Proxies/ | |
chmod -R 777 /Volumes/ramdisk/symfony/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Helper per la gestione delle immagini | |
*/ | |
/** | |
* Helper per il rendering delle immagini associate ad elementi del model | |
* | |
* <b>Options:</b> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/web/bundles/ | |
/app/bootstrap* | |
/app/cache/* | |
/app/logs/* | |
/vendor/ | |
/app/config/parameters.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Porzione del controller che valida il form di upload | |
if ($form->isValid()) { | |
$em = $this->getDoctrine()->getEntityManager(); | |
$document->upload(); | |
$em->persist($document); | |
$em->flush(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Altertabletoutf8 extends Doctrine_Migration_Base | |
{ | |
public function up() | |
{ | |
Doctrine::loadModels(sfConfig::get('sf_lib_dir').'/model/doctrine'); | |
$q = Doctrine_Manager::getInstance()->getConnection('doctrine'); | |
foreach (Doctrine::getLoadedModels() as $model) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$env = getenv('APP_ENV') ? getenv('APP_ENV') : 'prod'; | |
$debug = getenv('APP_DEBUG') == 'true' ? true : false; | |
require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); | |
$configuration = ProjectConfiguration::getApplicationConfiguration('frontend', $env, $debug); | |
sfContext::createInstance($configuration)->dispatch(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Mock iterator | |
* | |
* This attaches all the required expectations in the right order so that | |
* our iterator will act like an iterator! | |
* source from: http://www.davegardner.me.uk/blog/2011/03/04/mocking-iterator-with-phpunit/ | |
* | |
* @author: dave@mpdconsulting.co.uk | |
* @param Iterator $iterator The iterator object; this is what we attach | |
* all the expectations to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:10088> | |
SetEnv SISMO_DATA_PATH "/Volumes/Storage/sismo/.sismo/data" | |
SetEnv SISMO_CONFIG_PATH "/Volumes/Storage/sismo/.sismo/config.php" | |
ServerName sismo.localhost | |
DocumentRoot "/Volumes/Storage/sismo" | |
DirectoryIndex index.php | |
<Directory "/Volumes/Storage/sismo"> | |
Options FollowSymLinks |