Added a debug dump function to print out a model without getting stuck on the recursive inclusion of other models.

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716/site@393 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-28 01:11:27 +00:00
parent 24bca2c8e9
commit 4adf0dd2fc

View File

@@ -42,6 +42,25 @@ class AppModel extends Model {
var $useNullForEmpty = true;
var $formatDateFields = true;
/**************************************************************************
**************************************************************************
**************************************************************************
* function: queryInit
* - Initializes the query fields
*/
function prDump($all = false) {
$vars = get_object_vars($this);
foreach (array_keys($vars) AS $name) {
if (preg_match("/^[A-Z]/", $name))
unset($vars[$name]);
if (preg_match("/^_/", $name) && !$all)
unset($vars[$name]);
}
pr($vars);
}
/**
* Get Enum Values
* Snippet v0.1.3