src/Model/GeoLocation/Listing.php line 108

Open in your IDE?
  1. <?php
  2. namespace App\Model\GeoLocation;
  3. use Pimcore\Model;
  4. use Pimcore\Model\Paginator\PaginateListingInterface;
  5. class Listing extends Model\Listing\AbstractListing implements PaginateListingInterface
  6. {
  7.     /**
  8.      *
  9.      * @var array
  10.      */
  11.     public $data null;
  12.     /**
  13.      * @var string
  14.      */
  15.     public $locale;
  16.     /**
  17.      * get total count.
  18.      *
  19.      * @return mixed
  20.      */
  21.     public function count()
  22.     {
  23.         return $this->getTotalCount();
  24.     }
  25.     /**
  26.      * get all items.
  27.      *
  28.      * @param int $offset
  29.      * @param int $itemCountPerPage
  30.      *
  31.      * @return mixed
  32.      */
  33.     public function getItems($offset$itemCountPerPage)
  34.     {
  35.         $this->setOffset($offset);
  36.         $this->setLimit($itemCountPerPage);
  37.         return $this->load();
  38.     }
  39.     /**
  40.      * Get Paginator Adapter.
  41.      *
  42.      * @return $this
  43.      */
  44.     public function getPaginatorAdapter()
  45.     {
  46.         return $this;
  47.     }
  48.     /**
  49.      * Set Locale.
  50.      *
  51.      * @param mixed $locale
  52.      */
  53.     public function setLocale($locale)
  54.     {
  55.         $this->locale $locale;
  56.     }
  57.     /**
  58.      * Get Locale.
  59.      *
  60.      * @return string
  61.      */
  62.     public function getLocale()
  63.     {
  64.         return $this->locale;
  65.     }
  66.     /**
  67.      * Methods for Iterator.
  68.      */
  69.     /**
  70.      * Rewind.
  71.      */
  72.     public function rewind()
  73.     {
  74.         $this->getData();
  75.         reset($this->data);
  76.     }
  77.     /**
  78.      * current.
  79.      *
  80.      * @return mixed
  81.      */
  82.     public function current()
  83.     {
  84.         $this->getData();
  85.         $var current($this->data);
  86.         return $var;
  87.     }
  88.     /**
  89.      * key.
  90.      *
  91.      * @return mixed
  92.      */
  93.     public function key()
  94.     {
  95.         $this->getData();
  96.         $var key($this->data);
  97.         return $var;
  98.     }
  99.     /**
  100.      * next.
  101.      *
  102.      * @return mixed
  103.      */
  104.     public function next()
  105.     {
  106.         $this->getData();
  107.         $var next($this->data);
  108.         return $var;
  109.     }
  110.     /**
  111.      * valid.
  112.      *
  113.      * @return bool
  114.      */
  115.     public function valid()
  116.     {
  117.         $this->getData();
  118.         $var $this->current() !== false;
  119.         return $var;
  120.     }
  121. }