Magic Symfony!

I’m really enjoying to develop with symfony. I’m working a lot and studying very hard on my free time to be on the time with news. Of course on my job the most important thing is to be the best, I can’t do other thing. If I pause four hours to sleep, someone will be studying to be better than me.

Work with symfony is amazing, I love when I think “Wow! I did it in only one hour? Two months ago I was spending three or more hours.” That’s because symfony have magic! =)

You can utilize the magic findBy*() and findOneBy*() methods to find records by single fields value.

$user = Doctrine::getTable(‘User’)->findOneByUsername(‘jwage’);
$users = Doctrine::getTable(‘User’)->findByIsActive(1);

It’s magic, isn’t?

More information: http://www.symfony-project.org/doctrine/1_2/en/06-Working-With-Data#chapter_06_sub_finders

Respond to this post