Hey guys,
I am trying to implement pagination. My actions page has this simple query
* $c = new Criteria();
$c->add(QuestionsPeer::USERNAME,$userName);
$c->addSelectColumn(QuestionsPeer::QUESTION);*
$pagerOp = new sfPropelPager('Questions',15);
$pagerOp->setCriteria($c);
$pagerOp->setPage($this->getRequestParameter('page', 10));
$pagerOp->init();
$this->pager = $pagerOp;
Now in the templates, I am trying to check my the results of my pager, by
doing this
echo "<pre>"; print_r($pager->getResults()) ; echo "</pre>";
The output I should be getting should only be the *questions by
username=$userName* but this is not the case, and apparently everything is
getting out as output also, they are being outputted as protected variables,
meaning I cannot access them, which is the core problem here......this can
be seen as follow:
(Anyone know what's up here? please let me know...thanks!)
Array
(
[0] => Questions Object
(
[id:protected] => 0
[username:protected] =>
[course:protected] =>
[question_type:protected] =>
[question:protected] =>
[image_question:protected] =>
[points:protected] =>
[option1:protected] =>
[image_option1:protected] =>
[option2:protected] =>
[image_option2:protected] =>
[option3:protected] =>
[image_option3:protected] =>
[option4:protected] =>
[image_option4:protected] =>
[hint:protected] =>
[correctanswer:protected] =>
[topic:protected] =>
[level:protected] =>
[timelimit:protected] =>
[created_date:protected] =>
[last_edit_date:protected] =>
[is_validated:protected] =>
[alreadyInSave:protected] =>
[alreadyInValidation:protected] =>
[validationFailures:protected] => Array
(
)
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en