function getAllObjects() { $object = new LoanRule(); $object->orderBy('loanRuleId'); $object->find(); $objectList = array(); while ($object->fetch()) { $objectList[$object->loanRuleId] = clone $object; } return $objectList; }