Neoxygen\NeoClient\Formatter\Result::getSingle PHP Method

getSingle() public method

Returns a single item bound to the given identifier, or the default if the identifier is not bound.
public getSingle ( string $identifier, mixed $default = null ) : mixed
$identifier string
$default mixed A value to return if the identifier is not bound.
return mixed
    public function getSingle($identifier, $default = null)
    {
        $get = $this->get($identifier, $default);
        if (is_array($get)) {
            return array_values($this->identifiers[$identifier])[0];
        }
        return $get;
    }