Generate a progress value in milliseconds
@param string $index An index such as 'utime' or 'stime'
@return void|number
979729
private function elapsedTime( $index = 'utime')
	{
		if ( version_compare( PHP_VERSION, "7.0", "<" ) ) return;

		$rus = $this->rustart;
		$ru = getrusage();
		return ( $ru[ "ru_$index.tv_sec" ] * 1000 + intval( $ru[ "ru_$index.tv_usec" ] / 1000 ) ) - ( $rus[ "ru_$index.tv_sec" ] * 1000 + intval( $rus[ "ru_$index.tv_usec" ] / 1000 ) );
	}
531641
public function column($index = 0)
    {
        $stmt = $this->execute();

        if ($stmt) {
            return $stmt->fetchAll(PDO::FETCH_COLUMN, $index);
        } else {
            return false;
        }
    }
1050387
protected function updateProgressOutput( $phase )
    {
        if ( !$this->options->displayProgress || $this->output === null )
        {
            return;
        }
        $this->output->updateProgress( $phase );
    }
1091736
private function progress($length) {
		$bar = $this->output->createProgressBar(0);
		$bar->setFormat('[<fg=magenta>%bar%</>] <info>%elapsed%</info>');
		$bar->setEmptyBarCharacter('..');
		$bar->setProgressCharacter("\xf0\x9f\x8c\x80");
		$bar->advance($length);
		$bar->finish();
		echo "\r\n";
	}
196175
public function getResult($index = 0)
    {
        if($index == 0 && count($this->results) > 0)
            return current($this->results);

        return isset($this->results[$index]) ?
                    $this->results[$index]
                : null;
    }
162359
public function increment($value = 1)
    {
        $this->percent += $value;

        $percentage = (double)($this->percent / 100);

        $progress = floor($percentage * 50);
        $output = "\r[" . str_repeat('>', $progress);
        if ($progress < 50) {
            $output .= ">" . str_repeat(' ', 50 - $progress);
        } else {
            $output .= '>';
        }
        $output .= sprintf('] %s%% ', round($percentage * 100, 0));

        $speed = (time() - $this->startTime) / $this->percent;
        $remaining = number_format(round($speed * (100 - $this->percent), 2), 2);
        $percentage == 100 || $output .= " $remaining seconds remaining";

        Output::write($output);
        return $this;
    }
1313973
public function createIndex($index = null)
    {
        if (!$this->elasticsearch->indices()->exists(['index' => $index['index']])) {
            return $this->elasticsearch->indices()->create($index);
        }
    }
2461
private function internalDataListUpdateValueIfNeeded(&$data, $index)
    {
        $value = $data[$index];
        if (is_callable($value)) {
            $value = call_user_func($value);
            $data[$index] = $value;
        }
        if (is_object($value)) {
            return $value;
        }
        $value = (object) $value;
        $data[$index] = $value;
        return $value;
    }
152578
public function searchValue($index): self
    {
        $this->generatorToArray();

        // init
        $return = [];

        if ($this->array === []) {
            return static::create(
                [],
                $this->iteratorClass,
                false
            );
        }

        // php cast "bool"-index into "int"-index
        if ((bool) $index === $index) {
            $index = (int) $index;
        }

        if (\array_key_exists($index, $this->array) === true) {
            $return = [$this->array[$index]];
        }

        return static::create(
            $return,
            $this->iteratorClass,
            false
        );
    }
315775
private function setCursorToProgressBar(int $index, BufferedOutputInterface $output)
    {
        if ($this->currentIndex > $index) {
            // Move the cursor up.
            $this->moveCursorUp($this->currentIndex - $index, $output);
        } elseif ($this->currentIndex < $index) {
            // Move the cursor down.
            $this->moveCursorDown($index - $this->currentIndex, $output);
        }
    }
850182
public function setIndex($index)
    {
        if ($this->index !== $index) {
            $this->index = $index;
            $this->addOrUpdate();
        }
    }
1269839
public function setIndex($index)
	{
		if ( ! is_numeric($index) || ! is_int(+$index) || $index < 0) {
			throw new \InvalidArgumentException(
				__METHOD__."() expects parameter one, index, to be a positive "
				 ."integer or zero"
			);
		}
		
		$this->index = $index;
		
		return $this;
	}
906132
public function deleteIndex(string $index): void
    {
        $response = $this->searchClient->request('HEAD', '/' . $index);
        if ($response->getStatusCode() === 200) {
            $response = $this->searchClient->request('DELETE', '/' . $index);
            if ($response->getStatusCode() !== 200) {
                throw new Exception('The index "' . $index . '" could not be deleted. (return code: ' . $response->getStatusCode() . ')', 1395419177);
            }
        }
    }
1358168
protected function addArrValue($index)
    {
        $class_name = $this->fields[$index];
        $real_class_name = __NAMESPACE__ . "\\" . $class_name;
        return $this->values[$index][] = new $real_class_name();
    }
399526
function progress( $step )
    {
        $totalSteps = 0;
        foreach ( $this->StepTable as $tableStep )
        {
            if ( !isset( $tableStep['count_step'] ) or
                 $tableStep['count_step'] )
                ++$totalSteps;
        }

        $currentStep = 0;
        foreach ( $this->StepTable as $key => $tableStep )
        {
            if ( $step['class'] == $tableStep['class'] )
            {
                break;
            }
            else if ( !isset( $tableStep['count_step'] ) or
                      $tableStep['count_step'] )
                ++$currentStep;
        }

        return (int) ( $currentStep * 100 / ( $totalSteps - 1 ) );
    }
494195
public function getParamByIndex($index='')
		{
			if(!$index) return $this->_params['number'];
			
			return isset($this->_params['number'][$index]) ? (string) $this->_params['number'][$index] : null;
		}
59245
public function setId($index): self
    {
        \assert($index === null || \is_int($index) === true || \is_string($index) === true);

        $this->index = $index;

        return $this;
    }