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
# apps/*/config/factories.yml | |
all: | |
storage: | |
class: sfPDOSessionStorage | |
param: | |
database: master | |
db_table: session_storage |
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 | |
/* | |
* This file is part of the symfony package. | |
* (c) Fabien Potencier <fabien.potencier@symfony-project.com> | |
* (c) Jonathan H. Wage <jonwage@gmail.com> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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 | |
static protected function removeIncludePath($file) | |
{ | |
$includePaths = explode(PATH_SEPARATOR, get_include_path()); | |
foreach ($includePaths as $includePath) | |
{ | |
// ignore relative or invalid include paths | |
if (0 === strpos($includePath, '.') || false === $includePath = realpath($includePath)) |
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 | |
/** | |
* Validates the response. | |
* | |
* @return sfTestFunctionalBase|sfTester | |
*/ | |
public function isValid() | |
{ | |
if (preg_match('/(x|ht)ml/i', $this->response->getContentType(), $matches)) |
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 | |
/* | |
* This file is part of the symfony package. | |
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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 | |
protected function addDefaultBehaviors(SimpleXMLElement $table, $behaviors = array(), Properties $buildProperties) | |
{ | |
$behaviors = array_merge($behaviors, $this->getBehaviors($table)); | |
if ($buildProperties->getProperty('propel.builder.addBehaviors') && !in_array('symfony_behaviors', $behaviors)) | |
{ | |
$this->addBehavior($table, 'symfony_behaviors'); | |
} |
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 | |
// copy schema files to tmp directory and apply default behaviors there | |
$tmpDir = sys_get_temp_dir().'sf_propel_plugin/phingproj_'.time().'_'.rand(11111, 99999); | |
$this->getFilesystem()->mkdirs($tmpDir); | |
$this->getFilesystem()->copy(sfConfig::get('sf_config_dir').'/propel.ini', $tmpDir.'/propel.ini'); | |
$buildProperties = new Properties(); | |
$buildProperties->load(new PhingFile($tmpDir.'/propel.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
#!/bin/bash | |
svn propset svn:eol-style native Propel.php | |
svn propset svn:eol-style native PropelException.php | |
svn propset svn:eol-style native adapter/DBAdapter.php | |
svn propset svn:eol-style native adapter/DBMSSQL.php | |
svn propset svn:eol-style native adapter/DBMySQL.php | |
svn propset svn:eol-style native adapter/DBNone.php | |
svn propset svn:eol-style native adapter/DBOracle.php | |
svn propset svn:eol-style native adapter/DBPostgres.php |
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 | |
svn propset svn:eol-style native classes/propel/engine/EngineException.php | |
svn propset svn:eol-style native classes/propel/engine/GeneratorConfig.php | |
svn propset svn:eol-style native classes/propel/engine/behavior/AlternativeCodingStandardsBehavior.php | |
svn propset svn:eol-style native classes/propel/engine/behavior/SoftDeleteBehavior.php | |
svn propset svn:eol-style native classes/propel/engine/behavior/TimestampableBehavior.php | |
svn propset svn:eol-style native classes/propel/engine/builder/DataModelBuilder.php | |
svn propset svn:eol-style native classes/propel/engine/builder/om/ClassTools.php | |
svn propset svn:eol-style native classes/propel/engine/builder/om/OMBuilder.php |
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 MyForm extends sfForm | |
{ | |
public function configure() | |
{ | |
$subForm = new sfForm(); | |
$subValidators = array(); | |
$replace = new sfValidatorSchema(null, array('allow_extra_fields' => true, 'filter_extra_fields' => false)); |