Internal method to get a scalar value from server.

@return mixed
10654
public function requestValue($name)
    {
        $response = $this->client->request('GET', sprintf('/session/%s/%s', $this->sessionId, $name));
        $content = json_decode($response->getContent(), true);

        if (!isset($content['value'])) {
            throw new LibraryException('Malformed response: expected a key "value" in JSON response: '.$response->getContent());
        }

        return $content['value'];
    }
486843
public function getValue()
    {
        if (is_array($this->value)) {
            if (0 == count($this->value)) {
                return;
            } elseif (1 === count($this->value)) {
                return $this->value[0];
            } else {
                return $this->getRawMimeDirValue();
            }
        } else {
            return $this->value;
        }
    }
484429
public function scalar($idx=0)
    {
        $row = $this->row();

        if(is_null($row))

            return NULL;

        $values = is_numeric($idx) ? array_values($row) : $row;

        return $values[$idx];
    }
306535
public function getDisplayValue()
    {
        $result = '';
        $datetime = $this->getDateTime();
        if ($datetime !== null) {
            if ($this->akDateDisplayMode === null) {
                $this->load();
            }
            $dh = $this->app->make('helper/date');
            /* @var \Concrete\Core\Localization\Service\Date $dh */
            switch ($this->akDateDisplayMode) {
                case 'date':
                    $result = $dh->formatDate($datetime, 'short', $datetime->getTimezone());
                    break;
                case 'date_text':
                    if ($this->akTextCustomFormat === '') {
                        $result = $dh->formatDate($datetime, 'short', $datetime->getTimezone());
                    } else {
                        $result = $dh->formatCustom($this->akTextCustomFormat, $datetime, $datetime->getTimezone());
                    }
                    break;
                case 'text':
                    if ($this->akTextCustomFormat === '') {
                        $result = $dh->formatDateTime($datetime);
                    } else {
                        $result = $dh->formatCustom($this->akTextCustomFormat, $datetime);
                    }
                    break;
                case 'date_time':
                default:
                    $result = $dh->formatDateTime($datetime);
                    break;
            }
        }

        return $result;
    }
19861
public function extractKeys() {
    if (!$this->hasScalarKeys()) {
      throw new \DomainException('Cannot extract non-scalar keys from array lookup ' . $this);
    }
    return array_map(function(ScalarNode $key) { return $key->toValue(); }, $this->getKeys());
  }
759437
public function getValue() {
		// If we have five samples or fewer, fall back to a naive method.
		if ( $this->getCount() <= 5 ) {
			sort( $this->heights );
			$i = $this->p * count( $this->heights );
			if ( $i === floor( $i ) ) {
				return ( $this->heights[$i - 1] + $this->heights[$i] ) / 2;
			} else {
				return $this->heights[floor( $i )];
			}
		}

		return $this->heights[2];
	}
746913
public function getValue()
	{
		$value = parent::getValue();
		if ($value instanceof \DateTime) {
			$value->setTime(0, 0, 0);
			return $value;
		}
		return $value;
	}
494569
protected function getValue()
    {
        // before get
        if (!$this->trigger(CachePool::EVENT_GET_BEFORE)) {
            $this->setHit(false);
            return null;
        }

        // get string value from the pool
        $this->strval = $this->pool->getDriver()->get($this->key);

        // after get
        if (!$this->trigger(CachePool::EVENT_GET_AFTER)) {
            $this->setHit(false);
            $this->set(null);
        }

        return $this->postGetValue();
    }
1106436
public function getValue()
    {
        $from_input = $this
            ->grid
            ->getInputProcessor()
            ->getFilterValue($this->name);
        if ($from_input === null) {
            return $this->getDefaultValue();
        } else {
            return $from_input;
        }
    }
481190
public function getPort()
    {
        if ($this->_port === null) {
            $this->_port = !$this->getIsSecureConnection() && isset($this->swooleRequest->server['SERVER_PORT']) ? (int) $this->swooleRequest->server['SERVER_PORT'] : 80;
        }

        return $this->_port;
    }
1191106
def get_scalar_value(self, name):
        
        if name not in self.scalars:
            raise InvalidServiceConfiguration(
                'Invalid Service Argument Scalar "%s" (not found)' % name
            )
        new_value = self.scalars.get(name)
        return new_value
12131
public function getValue()
    {
        if ($this->_value < 10) {
            return '0.0' . $this->_value;
        } elseif ($this->_value < 100) {
            return '0.' . $this->_value;
        } else {
            return substr($this->_value, 0, -2) . '.' . substr($this->_value, -2);
        }
    }
136344
public function getValue() {
        if (!is_null($this->value))
            return $this->value;
        $value = $this->getArrayValue($this->form->method == 'POST' ? $_POST : $_GET, $this->getName());
        if ($value) {
            return $value;
        }
        $key = null;
        if (false !== strpos($this->name, '[')){
            $name = explode('[', $this->name, 2);
            $key = substr($name[1], 0, strlen($name[1]) - 1);
            $name = $name[0];
        } else {
            $name = $this->name;
        }
        if ($this->form->model && is_object($this->form->model) && (!$this->form->model->isNewRecord() || $this->form->model->$name)) {
            $val = $this->form->model->$name;
            if (!is_null($key)){
                return isset($val[$key])?$val[$key]:null;
            } else {
                return $val;
            }
        }
        return $this->defaultValue;
    }
319919
public function getValue()
    {
        $sql = '('.$this->query->toSql().')';

        if ($this->alias) {
            $alias = $this->query->getGrammar()->wrapTable($this->alias);

            $sql .= ' as '.$alias;
        }

        return $sql;
    }
245972
public function getMinValue()
    {
        $values = $this->values->toArray();

        uasort($values, $this->cmpValues('getName'));

        return reset($values);
    }
891918
public function getValueOld()
	{
		return $this->_value;

		switch ( $this->_xmlType->TypeCode )
		{
			case XmlTypeCode::String:

				return $this->_value;

			case XmlTypeCode::Double:

				if ( is_infinite( $this->_value ) )
				{
					return $this->_value > 0 ? INF : -INF;
				}

				// Can't do this because some conformance suite tests fail
				// as they expect a specifically formatted number.
				if ( ! is_string( $this->_value ) )
				{
					return $this->_value;
				}

				$maxDigits = 17;
				if ( preg_match( DecimalValue::Pattern, $this->_value, $matches ) )
				{
					if ( ! isset( $matches['exponent'] ) )
					{
						$maxDigits = min( @strlen( $matches['digits'] ) + @strlen( $matches['decimals'] ), $maxDigits );
					}
				}

				return str_replace( "+", "", sprintf( "%.{$maxDigits}G", $this->_value ) );

			case XmlTypeCode::Float:

				if ( is_infinite( $this->_value ) )
				{
					return $this->_value > 0 ? INF : -INF;
				}

				$maxDigits = 8;
				if ( preg_match( DecimalValue::Pattern, $this->_value, $matches ) )
				{
					// if ( isset( $matches['exponent'] ) )
					// {
					// 	return str_replace( "+", "", $this->_value );
					// }
					$maxDigits = min( @strlen( $matches['digits'] ) + @strlen( $matches['decimals'] ), $maxDigits );
				}

				return str_replace( "+", "", sprintf( "%.{$maxDigits}G", $this->_value ) );

		}

		return XPath2Convert::ToString( $this->_value );
	}
467899
public function getValue() {
		$value = $this->value;
		foreach($this->outputs as $inflector) {
			$value = $inflector($value);
		}
		return $value;
	}