fork download
  1. <?php
  2.  
  3. class Zend_Paginator {
  4. public function __construct($dummy) { }
  5.  
  6. public function getCurrentItem() {
  7. var_dump(__METHOD__);
  8. }
  9. }
  10.  
  11. class Grid
  12. {
  13. const DEFAULT_GRID_PAGE_SIZE = 10;
  14. protected $paginator = null;
  15. public function __construct($data){
  16. $this->paginator=new Zend_Paginator($data);
  17. }
  18. }
  19.  
  20. $list=new Grid($dane);
  21. $result=$list->paginator->getCurrentItem();
Runtime error #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
Fatal error: Cannot access protected property Grid::$paginator in /home/VNoa2N/prog.php on line 21