/*
@return String the cnonce value
769535
protected String getCNonce(){
      Double d = Math.floor(Math.random()*16777215);
      return Long.toHexString(Double.doubleToRawLongBits( d ));
  }
1100820
public function getEBNF()
    {
        $glue = array(
            '$concatenation' => array('', ' , ', ''),
            '$alternation'   => array('( ', ' | ', ' )'),
            '$repeat'        => array('{ ', '', ' }'),
            '$option'        => array('[ ', '', ' ]')
        );

        $render = function ($rule) use ($glue, &$render) {
            if (is_array($rule)) {
                $type = key($rule);

                foreach ($rule[$type] as &$_rule) {
                    $_rule = $render($_rule);
                }

                $return = $glue[$type][0] .
                          implode($glue[$type][1], $rule[$type]) .
                          $glue[$type][2];
            } else {
                $return = $rule;
            }

            return $return;
        };

        $return = '';

        foreach ($this->rules as $name => $rule) {
            $return .= $name . ' = ' . $render($rule) . " ;\n";
        }

        return $return;
    }
129596
public function getValue()
    {
        return implode(
            ',',
            [
                $this->center->getLatitude(),
                $this->center->getLongitude(),
                $this->radiusInKm,
            ]
        );
    }
232346
public function getContrast()
    {
        if (!preg_match('/^-*[0-9]+$/', $this->con)) {
            return;
        }

        if ($this->con < -100 or $this->con > 100) {
            return;
        }

        return (int) $this->con;
    }
388042
public function getApacheCtl()
    {
        if ($this->apachectl === false) {
            $shell = new CNabuShell();
            $response = array();
            if ($shell->exec('whereis apachectl', null, $response) && count($response) === 1) {
                $parts = preg_split('/\\s/', preg_replace('/^apachectl: /', '', $response[0]));
                $this->apachectl = $parts[0];
            }
        }

        return $this->apachectl;
    }
552734
public static function getEngine()
    {
        if (self::$nb_engine === null) {
            self::$nb_engine = new CNabuEngine();
            self::$nb_engine->init();
        }

        return self::$nb_engine;
    }
730743
public function count()
    {
        if ($this->cnt === null) {
            $this->cnt = $this->getDataSource()->count();
        }
        return $this->cnt;
    }
334516
public function chanCidDNID()
    {
        try
        {
            return $this->getSNMP()->walk1d( self::OID_ASTERISK_CHANNEL_CID_DNID );
        }
        catch( \Cityware\Snmp\Exception $e )
        {
            return null;
        }
    }
558274
protected function readNonceValue($nonce)
    {
        $value = null;

        if (null === $this->registryRepository) {
            if (true === is_readable($this->nonceDir.DIRECTORY_SEPARATOR.$nonce)) {
                $value = file_get_contents($this->nonceDir.DIRECTORY_SEPARATOR.$nonce);
            }
        } else {
            $value = $this->getRegistry($nonce)->getValue();
        }

        if (null !== $value) {
            $value = explode(';', $value);
        }

        return $value;
    }
210395
public function getNetPriceFormated()
    {
        $oLang = \OxidEsales\Eshop\Core\Registry::getLang();
        $oOrder = $this->getOrder();
        $oCurrency = \OxidEsales\Eshop\Core\Registry::getConfig()->getCurrencyObject($oOrder->oxorder__oxcurrency->value);

        return $oLang->formatCurrency($this->oxorderarticles__oxnprice->value, $oCurrency);
    }
676264
public static function getOS()
    {
        if (self::$nb_os === null) {
            self::$nb_os = new CNabuOS();
            self::$nb_os->init();
        }

        return self::$nb_os;
    }
1014416
protected function generateNonce()
    {
        // generate a random string
        $bits   = 256;
        $bytes  = ceil($bits / 8);
        $string = '';
        for ($i = 0; $i < $bytes; $i++) {
            $string .= chr(mt_rand(0, 255));
        }

        // sha1 hash
        return hash('sha1', $string);
    }
235193
function get_col_num(){
		if( ! isset($this->c) ){
			if( isset($this->children[0]) ){
				$this->c = $this->children[0]->get_col_num();
			}
			else {
				$this->c = 0;
			}
		}
		return $this->c;
	}
276640
public function chanCidANI()
    {
        try
        {
            return $this->getSNMP()->walk1d( self::OID_ASTERISK_CHANNEL_CID_ANI );
        }
        catch( \Cityware\Snmp\Exception $e )
        {
            return null;
        }
    }
1223647
public static function getFactory()
    {
        if (self::$nb_provider_factory === null) {
            self::$nb_provider_factory = new CNabuProviderFactory();
            self::$nb_provider_factory->init();
        }

        return self::$nb_provider_factory;
    }
961203
public function getLdapValue()
    {
        if ($this->never) {
            $value = self::NEVER;
        } else {
            $total = 0;
            foreach (self::UNIT as $unit => $conversion) {
                $total += $this->$unit * $conversion;
            }
            $value = number_format($total, 0, '.', '');
        }

        return $value;
    }
460987
public function getConstantSuffix()
    {
        $separator = PhpNameGenerator::STD_SEPARATOR_CHAR;
        return strtoupper(rtrim(preg_replace('/(\W|_)+/', $separator, $this->key), $separator));
    }