Tag Archives: PHP

Trick with variable name transformation in CakePHP

CakePHP is a good PHP MVC framework. You can study it easily and start developing web sites very fast. But it has some disadvantages, of course. One of them is strange rules for transformation variable name when it set in the controller. Statement $my_var = ‘Hello world!’; $this->set(‘my_var’, $my_var); will make the variable $my_var accessible… Continue reading →

Tags: , , ,

SugarCRM: check updating of object’s property

Sometimes it’s needed to know about updating of specified object’s property. SugarCRM keeps previous values for all object’s properties in the array fetched_row. For example, to realise it’s new object or just updated we should compare ID from that array and current value of object’s property: if($obj->fetched_row[‘id’] != $obj->id) {     echo "This’s a… Continue reading →

Tags: ,

Managing Standalone Scripts in PHP: part II

The second article about using standalone PHP script shows amazing ability of PHP such as fork, signals and demonizing. Yes, PHP allows to catch signals like SIGINT, SIGHUP, SIGALRM and so on. It’s really cool! When I develop background utils for SugarCRM I didn’t know about those useful PHP features. So, it’s time to make… Continue reading →

Tags: , , , ,

Get Adobe Flash playerPlugin by wpburn.com wordpress themes