or example

$precision = Zend_Locale_Math_PhpMath::$defaultPrecision;
        } else {
            $precision = pow(10, -$scale);
        }

        if (empty($op1)) {
            $op1 = 0;
        }
        $op1 = self::normalize($op1);
        $op2 = self::normalize($op2);
        $result = $op1 + $op2;
        if (is_infinite($result)  or  (abs($result - $op2 - $op1) > $precision)) {
            throw new Zend_Locale_Math_Exception("addition overflow: $op1 + $op2 != $result", $op1$op2$result);
        }

        return self::round(self::normalize($result)$scale);
    }

    public static function Sub($op1$op2$scale = null)
    {
        if ($scale === null) {
            $scale     = Zend_Locale_Math_PhpMath::$defaultScale;
            $precision = Zend_Locale_Math_PhpMath::$defaultPrecision;
        }
// set the timezone and offset for $this         $zone = @date_default_timezone_get();
        $this->setTimezone($zone);

        // try to get timezone from date-string         if (!is_int($date)) {
            $zone = $this->getTimezoneFromString($date);
            $this->setTimezone($zone);
        }

        // set datepart         if (($part !== null && $part !== self::TIMESTAMP) or (!is_numeric($date))) {
            // switch off dst handling for value setting             $this->setUnixTimestamp($this->getGmtOffset());
            $this->set($date$part$this->_locale);

            // DST fix             if (is_array($date) === true) {
                if (!isset($date['hour'])) {
                    $date['hour'] = 0;
                }

                $hour = $this->toString('H', 'iso', true);
                

    }

    private function _endElement($file$name)
    {
        switch (strtolower($name)) {
            case 'source':
                $this->_stag = false;
                break;

            case 'translation':
                if (!empty($this->_scontent) and !empty($this->_tcontent) or
                    (isset($this->_data[$this->_target][$this->_scontent]) === false)) {
                    $this->_data[$this->_target][$this->_scontent] = $this->_tcontent;
                }
                $this->_ttag = false;
                break;

            default:
                break;
        }
    }

    
if(!$this->_checkCode()) $exists=FALSE;
            $this->abort();
        }
        if($exists) $this->SendMSG("Remote file ".$pathname." exists");
        else $this->SendMSG("Remote file ".$pathname." does not exist");
        return $exists;
    }

    function fget($fp$remotefile$rest=0) {
        if($this->_can_restore and $rest!=0) fseek($fp$rest);
        $pi=pathinfo($remotefile);
        if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"])$this->AutoAsciiExt))) $mode=FTP_ASCII;
        else $mode=FTP_BINARY;
        if(!$this->_data_prepare($mode)) {
            return FALSE;
        }
        if($this->_can_restore and $rest!=0) $this->restore($rest);
        if(!$this->_exec("RETR ".$remotefile, "get")) {
            $this->_data_close();
            return FALSE;
        }
        if(!$this->_checkCode()) {
            $this->_data_close();
            
'date_format' => $this->_format, 'format_type' => 'iso',
                                                  'fix_date' => false));
            if (isset($parsed['year']) and ((strpos(strtoupper($this->_format), 'YY') !== false) and
                (strpos(strtoupper($this->_format), 'YYYY') === false))) {
                $parsed['year'] = Zend_Date::getFullYear($parsed['year']);
            }
        } catch (Exception $e) {
            // Date can not be parsed             return false;
        }

        if (((strpos($this->_format, 'Y') !== false) or (strpos($this->_format, 'y') !== false)) and
            (!isset($parsed['year']))) {
            // Year expected but not found             return false;
        }

        if ((strpos($this->_format, 'M') !== false) and (!isset($parsed['month']))) {
            // Month expected but not found             return false;
        }

        if ((strpos($this->_format, 'd') !== false) and (!isset($parsed['day']))) {
            
$this->_content = null;
                break;
            default:
                break;
        }
    }

    private function _endElement($file$name)
    {
        switch (strtolower($name)) {
            case 'tm:tu':
                if (!empty($this->_tag) and !empty($this->_content) or
                    (isset($this->_data[$this->_lang][$this->_tag]) === false)) {
                    $this->_data[$this->_lang][$this->_tag] = $this->_content;
                }
                $this->_tag     = null;
                $this->_content = null;
                break;

            default:
                break;
        }
    }

    

    public function getTmpDir()
    {
        $tmpdir = [];
        foreach ([$_ENV$_SERVER] as $tab) {
            foreach (['TMPDIR', 'TEMP', 'TMP', 'windir', 'SystemRoot'] as $key) {
                if (isset($tab[$key]) && is_string($tab[$key])) {
                    if (($key == 'windir') or ($key == 'SystemRoot')) {
                        $dir = realpath($tab[$key] . '\\temp');
                    } else {
                        $dir = realpath($tab[$key]);
                    }
                    if ($this->_isGoodTmpDir($dir)) {
                        return $dir;
                    }
                }
            }
        }
        $upload = ini_get('upload_tmp_dir');
        
case 'territory':
                $temp = self::_getFile($locale, '/ldml/localeDisplayNames/territories/territory', 'type');
                if ($value === 1) {
                    foreach ($temp as $key => $value) {
                        if ((is_numeric($key) === false) and ($key != 'QO') and ($key != 'QU')) {
                            unset($temp[$key]);
                        }
                    }
                } elseif ($value === 2) {
                    foreach ($temp as $key => $value) {
                        if (is_numeric($key) or ($key == 'QO') or ($key == 'QU')) {
                            unset($temp[$key]);
                        }
                    }
                }
                break;

            case 'variant':
                $temp = self::_getFile($locale, '/ldml/localeDisplayNames/variants/variant', 'type');
                break;

            case 'key':
                
if ($value == Zend_Locale_Format::STANDARD) {
                        $locale = self::$_options['locale'];
                        if (isset($options['locale'])) {
                            $locale = $options['locale'];
                        }
                        $options['date_format'] = Zend_Locale_Format::getDateFormat($locale);
                    } else if ((gettype($value) !== 'string') and ($value !== NULL)) {
                        $stringValue = (string)(is_array($value) ? implode(' ', $value) : $value);
                        throw new Zend_Locale_Exception("Unknown dateformat type '" . gettype($value) . "'. "
                            . "Format '$stringValue' must be a valid ISO or PHP date format string.");
                    } else {
                        if (((isset($options['format_type']) === true) and ($options['format_type'] == 'php')) or
                            ((isset($options['format_type']) === false) and (self::$_options['format_type'] == 'php'))) {
                            $options['date_format'] = Zend_Locale_Format::convertPhpToIsoFormat($value);
                        }
                    }
                    break;

                case 'format_type' :
                    if (($value != 'php') && ($value != 'iso')) {
                        throw new Zend_Locale_Exception("Unknown date format type '$value'. Only 'iso' and 'php'"
                           . " are supported.");
                    }
                    


    /** * Sets locale * * @param string|Zend_Locale $locale Locale to set * @throws Zend_Translate_Exception * @return Zend_Translate_Adapter Provides fluent interface */
    public function setLocale($locale)
    {
        if (($locale === "auto") or ($locale === null)) {
            $this->_automatic = true;
        } else {
            $this->_automatic = false;
        }

        try {
            $locale = Zend_Locale::findLocale($locale);
        } catch (Zend_Locale_Exception $e) {
            throw new Zend_Translate_Exception("The given Language ({$locale}) does not exist", 0, $e);
        }

        

        $builder->setParameters([
            'defaultCustomerGroup' => self::DEFAULT_CUSTOMER_GROUP,
            'customerGroup' => $customerGroupKey,
            'quantity' => self::DEFAULT_PRODUCT_QUANTITY,
            'placeholderUpTo' => self::PLACEHOLDER_UP_TO,
        ]);

        foreach ($this->Request()->getParam('filter', []) as $filter) {
            if ($filter['property'] === 'free') {
                $builder->andWhere(
                    $builder->expr()->or(
                        'details.ordernumber LIKE :free',
                        'product.name LIKE :free',
                        'supplier.name LIKE :free'
                    )
                );
                $builder->setParameter(':free', $filter['value']);
            }
        }

        $builder->setFirstResult($this->Request()->getParam('start'))
            ->setMaxResults($this->Request()->getParam('limit'))
            
$this->_tu = null;
                    break;
                case 'tuv':
                    $this->_tuv = null;
                    break;
                case 'seg':
                    $this->_seg = null;
                    if (!empty($this->_srclang) && ($this->_srclang == $this->_tuv)) {
                        $this->_tu = $this->_content;
                    }

                    if (!empty($this->_content) or (!isset($this->_data[$this->_tuv][$this->_tu]))) {
                        $this->_data[$this->_tuv][$this->_tu] = $this->_content;
                    }
                    break;
                default:
                    break;
            }
        }
    }

    /** * Internal method, called by xml element handler for content * * @param resource $file File handler * @param string $data Elements content */
$this->_content .= "</".$name.">";
        } else {
            switch (strtolower($name)) {
                case 'langset':
                    $this->_langset = null;
                    break;
                case 'term':
                    $this->_term = null;
                    if (empty($this->_termentry)) {
                        $this->_termentry = $this->_content;
                    }
                    if (!empty($this->_content) or (isset($this->_data[$this->_langset][$this->_termentry]) === false)) {
                        $this->_data[$this->_langset][$this->_termentry] = $this->_content;
                    }
                    break;
                default:
                    break;
            }
        }
    }

    private function _contentElement($file$data)
    {
        

        return $this->toString();
    }

    /** * Return the default locale * * @return array Returns an array of all locale string */
    public static function getDefault()
    {
        if ((self::$compatibilityMode === true) or (func_num_args() > 0)) {
            if (!self::$_breakChain) {
                self::$_breakChain = true;
                trigger_error('You are running Zend_Locale in compatibility mode... please migrate your scripts', E_USER_NOTICE);
                $params = func_get_args();
                $param = null;
                if (isset($params[0])) {
                    $param = $params[0];
                }
                return self::getOrder($param);
            }

            

        if (!is_string($value)) {
            $this->_error(self::INVALID);
            return false;
        }

        $matches = array();
        $length  = true;
        $this->_setValue($value);

        // Split email address up and disallow '..'         if ((strpos($value, '..') !== false) or
            (!preg_match('/^(.+)@([^@]+)$/', $value$matches))) {
            $this->_error(self::INVALID_FORMAT);
            return false;
        }

        $this->_localPart = $matches[1];
        $this->_hostname  = $matches[2];

        if ((strlen($this->_localPart) > 64) || (strlen($this->_hostname) > 255)) {
            $length = false;
            $this->_error(self::LENGTH_EXCEEDED);
        }
Home | Imprint | This part of the site doesn't use cookies.