Archive

Archive for the ‘PHP’ Category

Utilize FireBug (and FirePHP) to speed up Magento development

January 4th, 2009

Upsss… it’s 1 hour after midnight, still not sleeping. Hopefully I’ll manage to wake up in the morning, since I’m working. Anyhow… here’s a little something I made for you guys (for those who find it useful).

I was playing around with Zend Framework today, checking out available classes and methods. My eyes filled with yoj when I came across Zend_Wildfire_Plugin_FirePhp class. It’s located under /Zend/Wildfire/Plugin/FirePhp.php folder in ZendFramework. It’s around 600 hundred lines or so. What’s cool about this class is that it has this cool method you can use to shoot out messages to FireBug. If my info is correct, this class is added to ZendFramework from version 1.6. As of time of this writing, latest version of Magento is 1.2.0.1 and it comes packed with ZendFramework 1.7.2 which is also the latest version as of time of this writing. So, there you go, bingo. We now have this cool little class that can save as a bunch of time (or not). Read more…

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

Magento, PHP, ZendFramework , , ,

Zend Studio for Eclipse Professional | review at Inchoo.net

December 31st, 2008

For those interested, here is a short overview of Zend Studio for Eclipse Professional 6.1 I wrote at Inchoo.net. I say short because Zend Studio is huge… lots, and lots of features. Would be insane to go and list all of them.

I suggest you download it and try it out. Must say it looks great. I’m considering the possibility to purchase a license. I love the latests NetBeans because of it’s support for PHP, however seeing ZendStudio got my heart beating faster :)

Have a look… see for your self. Please shoot some thoughts and comments.

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

PHP

PHP tricks, converting variable to method

September 26th, 2008

Yesterday I was playing with Magento. Checking out the source code (methods, classes). I found an interesting class called Mage_Core_Model_Config_Options. Interesting because of the way you call methods from it.

To be honest, I did not know that one can store string name into the variable and if that name is the same as the name of some method inside the class you can call that method using that variable like

$this->$variableName();

Notice the brackets at the end. This is what tells the PHP to treat this as method. Cool, right?

Here is a sample code I wrote for you to see what I’m talking about.

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

Magento, PHP ,

PHP form data binding

September 21st, 2008

I am working on a project that has a lot of user input forms. Forms are used to submit entries to MySQL database. Submitting values to forms and processing them trough some PHP logic is no news for PHP.

The problem I encountered while developing my application was the mapping of values from database to $_POST variables and vice verse. This may not sounds like a that big of a deal but when you have more than a dozen of functions returning array of information that needs to be edited trough forms that mapping all those can be a overkill task. Read more…

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

PHP , ,

Setting up FirePHP with CodeIgniter

September 17th, 2008

I have been using FireBug for some time now. Although his prime purpose is for JavaScript debugging I use it mostly for fast drilling down to CSS stuff. I just love the possibility to change, delete or add CSS properties on HTML document on the fly. Anyway I like FireBug. In absence of one for all IDE it’s quite decent solution for debugging.

Contrast to JavaScript development I do a lot of PHP development. Sadly to say, I am hugely disappointed to PHP debugging solutions. I know there are few solutions out there like XDebug but they are simply no match to Microsoft’s Visual Studio debugger. Anyhow, a free is a free so be grateful. Read more…

Interesting? Share it!
  • Digg
  • del.icio.us
  • Google
  • Technorati
  • Facebook
  • TwitThis
  • description

CodeIgniter, PHP , , ,