Zwraca obliczoną ilość stron
@return integer
4769
public function getPagesCount()
    {
        return ceil($this->_grid->getState()->getDataCount() / $this->_grid->getState()->getRowsPerPage());
    }
321921
public function getCellPhoneNumber()
    {
        $mobil     = null;
        $mobilsRaw = $this->getFlexiData($this->getApiURL(),
            ['detail' => 'custom:id,mobil,kontakty(primarni,mobil)', 'relations' => 'kontakty']);
        if (is_array($mobilsRaw)) {
            $mobils = $mobilsRaw[0];
            if (array_key_exists('mobil', $mobils) && strlen(trim($mobils['mobil']))) {
                $mobil = $mobils['mobil'];
            }
            if (array_key_exists('kontakty', $mobils) && !empty($mobils['kontakty'])) {
                foreach ($mobils['kontakty'] as $kontakt) {
                    if (($kontakt['primarni'] == 'true') && strlen(trim($kontakt['mobil']))) {
                        $mobil = $kontakt['mobil'];
                        break;
                    }
                }
            }
        }
        return $mobil;
    }
786602
public function getExposureTime()
    {
        //brak exposure
        if (!isset($this->_exif['ExposureTime'])) {
            return;
        }
        //obliczenia czasu ekspozycji do eleganckiej postaci
        $arr = explode('/', $this->_exif['ExposureTime']);
        if (count($arr) == 2 && $arr[0] > 1 && $arr[1] > $arr[0]) {
            return '1/' . round($arr[1] / $arr[0]);
        }
        if (count($arr) == 2 && $arr[0] > 1 && $arr[1] > 0) {
            return round($arr[0] / $arr[1]);
        }
        return $this->_exif['ExposureTime'];
    }
772714
public function get()
    {
        $elapsed = $this->elapsed();
        //iteracja po danych
        foreach ($this->_data as $key => $item) {
            if ($elapsed == 0) {
                $this->_data[$key]['percent'] = 0;
                continue;
            }
            $this->_data[$key]['percent'] = 100 * $item['elapsed'] / $elapsed;
        }
        return $this->_data;
    }
1232632
public function getAge()
    {
        if (!$this->hasDateOfBirth()) {
            return 0;
        }

        $currentTimestamp = $GLOBALS['EXEC_TIME'];
        $birthTimestamp = $this->getDateOfBirth();

        $currentYear = (int)strftime('%Y', $currentTimestamp);
        $currentMonth = (int)strftime('%m', $currentTimestamp);
        $currentDay = (int)strftime('%d', $currentTimestamp);
        $birthYear = (int)strftime('%Y', $birthTimestamp);
        $birthMonth = (int)strftime('%m', $birthTimestamp);
        $birthDay = (int)strftime('%d', $birthTimestamp);

        $age = $currentYear - $birthYear;

        if ($currentMonth < $birthMonth) {
            $age--;
        } elseif ($currentMonth === $birthMonth) {
            if ($currentDay < $birthDay) {
                $age--;
            }
        }

        return $age;
    }
298414
public function getValue()
    {
        $from_input = $this
            ->grid
            ->getInputProcessor()
            ->getFilterValue('records_per_page');
        if ($from_input === null) {
            return $this->grid->getConfig()->getPageSize();
        } else {
            return (int) $from_input;
        }
    }
1079028
public function getNumbers()
    {
        return (string) \OxidEsales\Eshop\Core\Str::getStr()->substr($this->_cleanUp($this->_sCompanyVatNumber), 2);
    }
687088
public function actionIndex(): int
    {
        $dataTypes = $this->getDataTypes();
        $definitions = [];
        $overrideData = Data::parseYamlFile($this->overrideFile);

        $this->disableLogging();

        try {
            // Import from single file.
            if ($this->getStorageType() === self::SINGLE_FILE) {
                $definitions = $this->importDefinitionsFromFile($overrideData);
                $this->importFromDefinitions($dataTypes, $definitions);

                Schematic::info('Loaded schema from '.$this->file);
            }

            // Import from multiple files.
            if ($this->getStorageType() === self::MULTIPLE_FILES) {
                $definitions = $this->importDefinitionsFromDirectory($overrideData);
                $this->importFromDefinitions($dataTypes, $definitions);

                Schematic::info('Loaded schema from '.$this->path);
            }

            return 0;
        } catch (\Exception $e) {
            Schematic::error($e->getMessage());
            return 1;
        }
    }
593767
public function tell() : int
    {
        $pos = null;
        $err = ($this->stream === null || $this->isPipe === true);

        if ($err === false) {
            $pos = ftell($this->stream);
            $err = ($pos === false);
        }

        if ($err === true) {
            // @codeCoverageIgnoreStart
            throw new \RuntimeException("Could not get the position of the pointer in stream.");
            // @codeCoverageIgnoreEnd
        }

        return $pos;
    }
647157
public function getAnyPhoneNumber()
    {
        $phoneNo    = null;
        $numbersRaw = $this->getFlexiData($this->getApiURL(),
            ['detail' => 'custom:id,mobil,tel,kontakty(primarni,mobil,tel)', 'relations' => 'kontakty']);
        if (is_array($numbersRaw) && !empty($numbersRaw[0])) {
            $numbers = $numbersRaw[0];
            if (array_key_exists('mobil', $numbers) && strlen(trim($numbers['mobil']))) {
                $phoneNo = $numbers['mobil'];
            }
            if (array_key_exists('tel', $numbers) && strlen(trim($numbers['tel']))) {
                $phoneNo = $numbers['tel'];
            }
            if (array_key_exists('kontakty', $numbers) && !empty($numbers['kontakty'])) {
                foreach ($numbers['kontakty'] as $kontakt) {
                    if ($kontakt['primarni'] == 'true') {
                        
                    }
                    if (strlen(trim($kontakt['mobil']))) {
                        $phoneNo = $kontakt['mobil'];
                        break;
                    } elseif (strlen(trim($kontakt['mobil']))) {
                        $phoneNo = $kontakt['mobil'];
                        break;
                    }
                }
            }
        }
        return $phoneNo;
    }
1325660
public function getBruttoSum()
    {
        $dSum = 0;
        foreach ($this->_aList as $oPrice) {
            $dSum += $oPrice->getBruttoPrice();
        }

        return $dSum;
    }
308300
protected function getResourceLength(): int
    {
        if (null === $this->fileName) {
            return parent::getResourceLength();
        }

        if (substr($this->fileName, 0, 16) === 'compress.zlib://') {
            return filesize(substr($this->fileName, 16));
        } elseif (substr($this->fileName, 0, 17) === 'compress.bzip2://') {
            return filesize(substr($this->fileName, 17));
        }

        return parent::getResourceLength();
    }
270096
public function getEOL()
    {
        $pos = $this->pos();

        $this->rewind();
        $pos2 = $this->search("\n", false, false);
        if ($pos2) {
            $this->seek(-1);
            $eol = ($this->getChar() == "\r")
                ? "\r\n"
                : "\n";
        } else {
            $eol = is_null($pos2)
                ? null
                : "\n";
        }

        $this->seek($pos, false);

        return $eol;
    }
587030
public function parse()
	{
		$matches = array();

		// строка вида {env._SERVER.LC_NAME}
		if (preg_match_all('/\{env\.([\w\.]+)\}/im', $this->record->formatted, $macrosList) > 0)
		{
			foreach ($macrosList[1] as $match)
			{
				$parts = explode(".", $match);
				$array = @$GLOBALS[$parts[0]];
				array_shift($parts);
				$val = $array;

				foreach ($parts as $i => $key)
				{
					if (is_array($val))
						$val = @$val[$key];
					else if (is_object($val))
						$val = $val->{$key};
				}

				if (is_array($val) || is_object($val))
					$val = print_r($val, 1);

				$this->record->formatted = str_replace("{env." . $match . "}", $val, $this->record->formatted);
			}
		}

		return $this->record;
	}
416300
public function count()
    {
        if(is_null($this->int_count)){
            $this->int_count = mb_strlen($this->value, C::ENCODING);
        }

        return $this->int_count;
    }
745176
public function index()
    {
        $oUri       = Factory::service('Uri');
        $oInput     = Factory::service('Input');
        $oSession   = Factory::service('Session', 'nails/module-auth');
        $oUserModel = Factory::model('User', 'nails/module-auth');

        $iId      = $oUri->segment(3);
        $sCode    = $oUri->segment(4);
        $sStatus  = '';
        $sMessage = '';
        $oUser    = $oUserModel->getById($iId);

        if ($oUser && !$oUser->email_is_verified && $sCode) {

            try {

                if (!$oUserModel->emailVerify($oUser->id, $sCode)) {
                    throw new NailsException($oUserModel->lastError());
                }

                //  Reward referrer (if any)
                if (!empty($oUser->referred_by)) {
                    $oUserModel->rewardReferral($oUser->id, $oUser->referred_by);
                }

                $sStatus  = 'success';
                $sMessage = 'Success! Email verified successfully, thanks!';

            } catch (\Exception $e) {
                $sStatus  = 'error';
                $sMessage = 'Sorry, we couldn\'t verify your email address. ' . $e->getMessage();
            }
        }

        // --------------------------------------------------------------------------

        if ($oInput->get('return_to')) {
            $sRedirect = $oInput->get('return_to');
        } elseif (!isLoggedIn() && $oUser) {
            if ($oUser->temp_pw) {
                $sRedirect = 'auth/password/reset/' . $oUser->id . '/' . md5($oUser->salt);
            } else {
                $oUserModel->setLoginData($oUser->id);
                $sRedirect = $oUser->group_homepage;
            }
        } elseif ($oUser) {
            $sRedirect = $oUser->group_homepage;
        } else {
            $sRedirect = '/';
        }

        if (!empty($sStatus)) {
            $oSession->setFlashData(
                $sStatus,
                $sMessage
            );
        }
        redirect($sRedirect);
    }
538706
public function GetIndexStatus()
    {
        $dStatus = false;
        if ($this->IsRunning()) {
            $iRemainingRows = $this->GetRemainingRowCount();
            if (0 == $iRemainingRows) {
                $dStatus = false;
                $this->IndexCompletedHook();
            } else {
                $dStatus = (($this->fieldTotalRowsToProcess - $iRemainingRows) / $this->fieldTotalRowsToProcess) * 100;
            }
        }

        return $dStatus;
    }