public function __set($propertyName, $value) { global $firePHP; $return = ''; $return = parent::__set($propertyName, $value); switch ($propertyName) { case 'totalItems': case 'totalPages': case 'itemsPerPage': $this->totalPages = ceil((int) $this->totalItems / (int) $this->itemsPerPage); // fb::log('$this->totalPages = ' . $this->totalPages); // fb::log('$this->totalPages = ' . $this->totalPages); case 'itemOffset': case 'currentPage': if ((int) $this->currentPage < 2) { $this->itemOffset = 0; $this->currentPage = 1; } else { $this->itemOffset = ((int) $this->currentPage - 1) * (int) $this->itemsPerPage; } // fb::log('$this->itemOffset = ' . $this->itemOffset); break; } return $return; }
public function __set($propertyName, $value) { $return = ''; $return = parent::__set($propertyName, $value); switch ($propertyName) { case 'singleBox': if (!$this->singleBox) { $this->_addTraceInfo(__FILE__, __METHOD__, __LINE__, 'Setting multiple box mode, changing separator...'); $this->separator = '|||'; } break; } return $return; }