Symfony – configure database using command

September 30th, 2011 § 0 comments § permalink

Symfony command line helps us a lot to do the task easier and faster. One of the best example is configuring database in symfony. There are two ways you can configure database.

First method is give direct entry to database.yml. But I find the command line  as  easy and quick way to configure database in symfonny 1.4.

You can even easily specify the environment in which the database configuration belongs to. The command will write the the database configuration into database.yml.

Symfony – using isset on sfOutputEscaperObjectDecorator

August 18th, 2011 § 0 comments § permalink

Have you tried isset function on doctine object from  template? Something like this?
Eg:

   If you tried this you will know that isset will return only false. Because the Doctrine Object is wrapped with sfOutputEscaperObjectDecorator. So if you like to check the presence of a property then you should use something like this.

Happy coding