Connecting the dots...
Thoughts on Web Development, Scalability and Application Architecture
  • Home
  • About Rajat Pandit
  • Contact
Browse: Home / Symfony

Symfony

Using sfValidatorCallback

By rp on January 1, 2010

Writing this post down as a note to self about using sfValidatorCallback.
Step 1: add the sfValidatorCallback to the widget

public function configure()
{
$this->widgetSchema['my_field'] =
new sfWidgetFormTextArea(array(‘required’ => false));
// add the validator
$this->validatorSchema['my_field'] = new sfValidatorCallback(
array(‘callback’ => array(
[...]

Posted in Web Development | Tagged forms, sfCallbackValidator, sfForm, Symfony, validation, validator | Leave a response

sfDoctrineGuardPlugin: Signup, Validation and Profile

By rp on December 30, 2009

I am a big fan of using plugins in symfony especially that are well written and save me a bunch of time implementing some bog standard functionality. SfDoctrineGuardPlugin is an example of one such plugin but due the generic nature of the signup process there is a lot left to be implemented even after using [...]

Posted in Web Development | Tagged csrf token, profile, registration, sfDoctrineGuardPlugin, Symfony, validation | 1 Response

Creating utf-8 tables in symfony 1.4 /doctrine 1.2

By rp on December 19, 2009

Recently I had an issue on one of my work websites where the database schema was setup in Latin-1 encoding, this was fine till the encoding of the website was also set to iso-8859-1 and nothing fancy was going on. However later in the last few months, I had been doing some development which required [...]

Posted in Web Development | Tagged doctrine, Symfony, utf-8 | 6 Responses

Upgrading to symfony 1.4

By rp on December 7, 2009

To typically upgrade the version of symfony, I usually run the command

# sudo pear upgrade symfony/symfony

But it seems that the channel details have updated you would require updating that first and then you can upgrade to symfony 1.4. This is what i did.

rp@devbox:/usr/share/php/symfony$ sudo pear channel-update pear.symfony-project.com
Updating channel "pear.symfony-project.com"
Update of Channel "pear.symfony-project.com" succeeded

rp@devbox:/usr/share/php/symfony$ sudo pear [...]

Posted in Web Development | Tagged 1.4, Symfony, upgrade | Leave a response

[Doctrine_Parser_Exception] Fail-some error message!

[Doctrine_Parser_Exception] Fail-some error message!

By rp on August 23, 2009

If your precious evening hacking time has been wasted by this useless error message:

rp@devbox:trunk$ php symfony –trace doctrine:build-all-reload –no-confirmation
>> doctrine dropping databases
>> doctrine Successfully dropped database f…octrine" named "secret_project"
>> doctrine creating databases
>> doctrine Successfully created database f…octrine" named "secret_project"
>> doctrine generating model classes

[Doctrine_Parser_Exception]
Unable to parse string: [...]

Posted in Web Development | Tagged doctrine, jwage, orm, php, Symfony | 1 Response

truncate table propel style.

By rp on July 30, 2009

a quick post to note how to truncate the table using propel:

Propel::getConnection(‘connection_name’)->executeUpdate(‘TRUNCATE TABLE put_table_name_here’);

Posted in Web Development | Tagged mysql, propel, Symfony | Leave a response

Symfony development process

By rp on July 11, 2009

My development process involves using doctrine and svn. Documenting my development steps to make sure I can put this is some sort of build script in future.
Creating svn directories

svn mkdir -m "create default directories" http://svn.clients.rajatpandit.com/project-name/trunk http://svn.clients.rajatpandit.com/project-name/tags http://svn.clients.rajatpandit.com/project-name/branches

Checkout these directories locally:

svn co http://svn.clients.rajatpandit.com/project-name/ .

Move to the trunk directory

cd trunk

Creating a new project

$ symfony generate:project brp
$ [...]

Posted in Web Development | Tagged build process, development, doctrine, process, svn, Symfony | Leave a response

Writing a Criteria statement for the IN Operator

By rp on April 16, 2009

This is going to be a quick post as I needed to write this done as its quite useful for anyone who either doesnt like or doesnt understand how the complex criteria objects work.
If you want to write code for a criteria object for the SQL statement which is something like this.

SELECT field1, field2 from [...]

Posted in Web Development | Tagged array, criteria, propel, sql statement, Symfony | Leave a response

Conditional Validator in Symfony

By rp on February 22, 2009

I recently had to work on a signup form where the user was present different set of fields based on where the user came from. Lets take a sample scenario, I have a signup form where users get to from the “Plans” page.
If the user chooses to go with the Free Plan, he gets [...]

Posted in Web Development | Tagged algorithm, array, cc expiry, conditional validator, confirmation, credit card info, credit card validator, password validation, Symfony, widgets | 1 Response

using svn for development in symfony

using svn for development in symfony

By rp on February 8, 2009

The recent project that I am working on for a client has taught me more about svn than I ever did because of the complex nature of the product. It has been going through a proper product development cycle which involves quick iteration of features and sometimes, such dramatic changes that can make the entire [...]

Posted in Web Development | Tagged bug fixes, development, directory structure, dramatic changes, empty directory, initial directory, iteration, nature of the product, php, product development cycle, repos, secret project, svn, Symfony | 3 Responses

Next »

Search

Sponsored Links

Dreamhost Rewards

Symfony Experts

Categories

  • Getting Things Done (RSS) (3)
  • SEO (RSS) (1)
  • Web Development (RSS) (86)

Recent Comments

  • zakaria on Skype audio playback and capture problem on ubuntu 8.10
  • Allen on sfDoctrineGuardPlugin: Signup, Validation and Profile
  • Susan on Creating utf-8 tables in symfony 1.4 /doctrine 1.2
  • Tynisha Cooper on FOWA 2008
  • Affordable Web Development on Making footer stick to the bottom of the page

Tags

accessiblity Add new tag apache 2 array bot build process Clean CSS dependencies development doctrine email gmail googl hack irc Javascript JeOS leopard linux mac macfusion mail namespaced OSX pear perl php propel protocol quit now search SEO simplexml ssh sshfs svn Symfony synchronization Ubuntu upgrade validation variants Yahoo! yahoo search

Copyright © 2010 Connecting the dots....