Skip to content

Instantly share code, notes, and snippets.

View kriswallsmith's full-sized avatar

Kris Wallsmith kriswallsmith

  • Portland, Oregon USA
  • 23:28 (UTC -07:00)
View GitHub Profile
# apps/*/config/factories.yml
all:
storage:
class: sfPDOSessionStorage
param:
database: master
db_table: session_storage
<?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.
*/
<?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))
<?php
/**
* Validates the response.
*
* @return sfTestFunctionalBase|sfTester
*/
public function isValid()
{
if (preg_match('/(x|ht)ml/i', $this->response->getContentType(), $matches))
<?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.
*/
<?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');
}
<?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'));
#!/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
#!/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
<?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));