Return the rule $index from the rules container

@return mixed Callable | string
764457
public function getRule($index)
    {
        if (!$this->hasRule($index)) {
            throw new \Exception('Rule not found: ' . $index);
        }

        return $this->rules[$index];
    }
1117440
public function getTokenAt($index) {
        // Get token from behind
        if ($index < 0) {
            $index = count($this->tokens) + $index;
        }

        return $this->tokens[$index];
    }
779632
public function get($index)
    {
        if( $index >= count($this->generators) || $index < 0 )
            return null;
          
        return $this->generators[$index];
    }
1266153
public function getRules()
    {
        if (!isset($this->ruleSet)) {
            $this->ruleSet = new PriorityList(RuleInterface::class);
        }
        return $this->ruleSet;
    }
160850
public function getRuleProviderDefault() : RuleProviderInterface
    {
        $container = Dependency::container();
        return $container->has('validate') ? $container->get('validate') : Validate::getInstance();
    }
708202
public static function getRulesEndIndexes(array $arrayRulesIndexes): array
    {
        assert(array_key_exists(static::RULES_ARRAY_END_INDEXES, $arrayRulesIndexes));
        $result = $arrayRulesIndexes[static::RULES_ARRAY_END_INDEXES];

        return $result;
    }
779822
public function getRules()
    {
        if (!$this->rules) {
            return '[]';
        }
        $results = '[' . PHP_EOL;

        foreach ($this->getSchemaParser()->toArray() as $column => $value) {
            $results .= "\t\t'{$column}'\t=>'\t{$value}'," . PHP_EOL;
        }

        return $results . "\t" . ']';
    }
466929
public MatchRule getMatchRule(int index) {
		if (index < rules.size()) {
			return rules.get(index);
		}
		return null;
	}
642462
public function get($index)
    {
        if (null === $index) {
            throw new Exception\InvalidArgumentException('The specified key name is null');
        }

        if (!$this->has($index)) {
            throw new Exception\OutOfBoundsException(sprintf('Index "%s" is out of bounds', $index));
        }

        return $this->collections[$index];
    }
357271
public function getAddIndexDDL(Index $index)
    {
        $pattern = "
CREATE %sINDEX %s ON %s (%s);
";

        return sprintf($pattern,
            $this->getIndexType($index),
            $this->quoteIdentifier($index->getName()),
            $this->quoteIdentifier($index->getTable()->getName()),
            $this->getIndexColumnListDDL($index)
        );
    }
903830
public function get($index, $default = null)
	{
		if ($this->hasByIndex($index))
		{
			return $this->store[$index];
		}

		if ($default instanceof \Closure)
		{
			return $default($this);
		}

		return $default;
	}
1360820
public function getRule($ruleName)
    {
        return isset($this->rules[$ruleName]) ? $this->rules[$ruleName] : null;
    }
149175
public function getPartByIndex($index)
    {
        if (!isset($this->_parts[$index])) {
            return null;
        }

        $part = $this->_parts[$index];
        $part->parent = $this;

        return $part;
    }
542401
public function getRules($rules): \Generator
    {
        foreach ($this->parser->split($rules) as $id => $rule) {
            if (empty($id) || $rule instanceof \Closure) {
                yield new CallableRule($rule);
                continue;
            }

            // fetch from cache
            if (isset($this->rules[$id])) {
                yield $this->rules[$id];
                continue;
            }

            $function = $this->parser->parseCheck($rule);
            $conditions = $this->parser->parseConditions($rule);

            $check = $this->makeRule(
                $this->config->mapFunction($function),
                $rule
            );

            yield $this->rules[$id] = $check->withConditions($this->makeConditions($conditions));
        }
    }
997458
public function getMapByIndex($index)
    {
        $map = array_slice($this->maps, (int) $index, 1, false);

        return end($map);
    }
1168802
public function getIndexRealname($index)
    {
        if (isset($this->indexAliasMap[$index])) {
            return $this->indexAliasMap[$index];
        }

        return $index;
    }
114133
protected function parentIndex($index)
	{
		$r = false;
		
		if($index > 1)
		{
			$r = floor($index / 2);
		}
		else if($index === 1)
		{
			$r = null;
		}
		
		return $r;
	}