Get

@param string|int $get   = 1
@param string|int $index = 1
@param bool       $while = false

@return string
969695
public static function get($get = 1, $index = 1, Bool $while = false) : String
    {
        if( ! IS::char($index) )
        {
            $index = 1;
        }

        if( ! is_scalar($while) )
        {
            $while = false;
        }

        $segArr = self::segmentArray();
        $segVal = '';

        if( is_numeric($get) )
        {
            return self::getByIndex($get, $index);
        }

        if( in_array($get, $segArr) )
        {
            $segVal = array_search($get, $segArr);

            # 3. parameter is not empty
            # 2. The non-numerical state of the parameter
            if( ! empty($while) && ! is_numeric($index) )
            {
                return self::getByName($get, $index);
            }

            # 2. the parameter is all-in
            # It gives all segments from parameter 1.
            if( $index === 'all' )
            {
                return self::getNameAll($get);
            }

             # 3. parameter is not empty
            if( ! empty($while) )
            {
                $return = '';

                $countSegArr = count($segArr) - 1;

                if( $index > $countSegArr )
                {
                    $index = $countSegArr;
                }

                if( $index < 0 )
                {
                    $index = $countSegArr + $index + 1;
                }

                for( $i = 1; $i <= $index; $i++ )
                {
                    $return .= $segArr[$segVal + $i]."/";
                }

                $return = substr($return,0,-1);

                return $return;
            }

            # 2. the parameter is all-in
            # It gives all segments from parameter 1.
            if( $index === "count" )
            {
                return self::getNameCount($get);
            }

            if( isset($segArr[$segVal + $index]) )
            {
                return $segArr[$segVal + $index];
            }
            else
            {
                return false;
            }
        }
        else
        {
            return false;
        }
    }
249161
public static function get($key = false) {

        if (isset($_GET)) {

            if ($key) {

                return $_GET[$key];
            }

            return $_GET;
        }

        return false;
    }
440927
public Object get (int index)
    {
        return _list[(_lastPos-index-1+_list.length)%_list.length];
    }
685249
public static function get(string $list, $index, string $separator, string $tag = ''): string
    {
        $items = self::explode($separator, $list);
        if (isset($items[$index])) {
            $item = $items[$index];
            if ($tag !== '' && substr($item, 0, 1) === $tag && substr($item, -1) === $tag) {
                $item = substr($item, 1, -1);
            }
            return $item;
        }
        return '';
    }
151283
@Override
    public E get(int index) {
        int idx = checkRangeConvert(index);
        return pointer.getElem(idx, idx ^ focus);
    }
959542
public Object get(int index) {

        if (index >= elementCount) {
            throw new IndexOutOfBoundsException("Index out of bounds: "
                                                + index + " >= "
                                                + elementCount);
        }

        if (index < 0) {
            throw new IndexOutOfBoundsException("Index out of bounds: "
                                                + index + " < 0");
        }

        return elementData[index];
    }
1206736
public static function getByName(String $get, $index = NULL) : String
    {
        $segArr = self::segmentArray();
        
        $getVal = (int) array_search($get, $segArr);

        if( $index === 'all' )
        {
            $indexVal = count($segArr) - 1;
        }
        else
        {
            $indexVal = array_search($index, $segArr);
        }

        $return = '';

        for( $i = $getVal; $i <= $indexVal; $i++ )
        {
            $return .= $segArr[$i]."/";
        }

        return substr($return, 0, -1);
    }
1125723
private function createHttpRequest(GetIndexRequest $getRequest)
    {
        $resquest = $this->createIndexRequest('GET', $getRequest->name);

        $resquest->setHeader('Accept', 'application/json');

        return $resquest;
    }
268430
public function get($url, $data = [], $method = 'post') {

        $ch = curl_init($this->gitlab_host . '/api/v3' . $url);
       
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
            'PRIVATE-TOKEN:' . $this->private_key
        ));
        if($this->debug){
            curl_setopt($ch, CURLOPT_VERBOSE, true);
            if(!\sb\Gateway::$command_line){
                $curl_log = fopen("php://temp", 'rw');
                curl_setopt($ch, CURLOPT_STDERR, $curl_log);
            }
            
        }
         
       
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        
        if ($data) {
            curl_setopt($ch, CURLOPT_POST, true);
            curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
            if ($method != 'post') {
                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
            }
        }

        $error = curl_error($ch);
        $error_no = curl_errno($ch);
      
        if ($error_no) {
            throw(new \Exception($error . ': ' . $error_no));
        }
        $data = json_decode(curl_exec($ch));
        
        if($this->debug && !\sb\Gateway::$command_line){
            rewind($curl_log);
            $output= fread($curl_log, 2048);
            echo "<pre>". print_r($output, 1). "</pre>";
            fclose($curl_log);

        }
        
        return $data;
    }
90838
public function getByIndex(int $index) : string
        {
                $value = $this->_redis->lindex($this->_key, $index);
                return !empty($value)?$value:'';
        }
868435
@Override
    public Object get(int index, Scriptable start) {
        if (0 <= index && index < string.length()) {
            return String.valueOf(string.charAt(index));
        }
        return super.get(index, start);
    }
791085
public function getQuery($index = false)
    {
        return ($index) ? array_value($this->query, $index) : $this->query;
    }
393403
public function getPost($index, $xss_clean = true)
    {
        return isset($this->request->get[$index])
            ? $this->get($index, $xss_clean)
            : $this->post($index, $xss_clean);
    }
1209089
public Object get(int index) throws JSONException {
        try {
            Object value = values.get(index);
            if (value == null) {
                throw new JSONException("Value at " + index + " is null.");
            }
            return value;
        } catch (IndexOutOfBoundsException e) {
            throw new JSONException("Index " + index + " out of range [0.." + values.size() + ")");
        }
    }
1082086
public function getKey($index)
    {
        Assertion::integer($index, 'The index must be a positive integer.');
        Assertion::greaterOrEqualThan($index, 0, 'The index must be a positive integer.');
        Assertion::true($this->hasKey($index), 'Undefined index.');

        return $this->getKeys()[$index];
    }
124751
public function get($index = 0)
        {
            if (is_integer($index)) {
                if ($index + 1 > $this->count()) {
                    return null;
                } else {
                    return Arrays::first(array_slice($this->_items, $index, 1));
                }
            } else {
                if ($this->has($index)) {
                    return $this->_items[$index];
                }
            }

            return null;
        }
1356387
public function getRow($index,$force=true){
		if($index<sizeof($this->rows)){
			$result=$this->rows[$index-1];
		}else if ($force){
			$this->setNumRows($index);
			$result=$this->rows[$index-1];
		}
		return $result;
	}