Lookup section and key.
@param $section The section to lookup
@param $key The key to lookup (optional)
@return Array with section as first entry and key as second or null if not found
181615
protected function lookup($section, $key=null) {
    $lookupKey = strtolower($section).':'.strtolower($key);
    if (isset($this->lookupTable[$lookupKey])) {
      return $this->lookupTable[$lookupKey];
    }
    return null;
  }
247862
def keys(self, section=None):
        """"""
        if not section and self.section:
            section = self.section
        config = self.config.get(section, {}) if section else self.config
        return config.keys()
275677
public function keysForSection(string $section, array $default = []): array
    {
        if (isset($this->propertyData[$section])) {
            return array_keys($this->propertyData[$section]);
        }

        return $default;
    }
1126433
private function section($sectionName)
    {
        if (!\array_key_exists($sectionName, $this->sectionList)) {
            throw new TplException(sprintf('section "%s" does not exist', $sectionName));
        }

        return $this->sectionList[$sectionName];
    }
742530
public function sectionHasKey($section, $key)
    {
        return (isset($this->raw_parameters[$section])
            && is_array($this->raw_parameters[$section])
            && array_key_exists($key, $this->raw_parameters[$section])
        );
    }
669209
public function arrayAccessByKey($key)
    {
        if (! isset($this->nameLookupTable[$key])) {
            return null;
        }

        if (isset($this->items[$this->nameLookupTable[$key]])) {
            return $this->items[$this->nameLookupTable[$key]];
        }

        return null;
    }
22797
function findFieldByKey(string $key)
    {
        $this->checkFormIsBuilt();

        $fields = collect($this->fields);

        if(strpos($key, ".") !== false) {
            list($key, $itemKey) = explode(".", $key);
            $listField = $fields->where("key", $key)->first();

            return $listField->findItemFormFieldByKey($itemKey);
        }

        return $fields->where("key", $key)->first();
    }
474414
public function getSection($section = null)
    {
        if (null === $this->container) {
            return $this->getRawSection($section);
        }

        return $this->compileParameters($section);
    }
915960
def get_one(self, section, key):
        
        lines = iter(self.get(section, key))
        try:
            return next(lines)
        except StopIteration:
            raise KeyError("Key %s not found in %s" % (key, section))
971134
private function findSection($section)
	{
		// Check section type
		if (is_int($section) || $section === 'new') {
			return $section;
		} else if (is_string($section)) {
			// Search section names for related index
			$sections = array_keys($this->sections->byName);
			$index = array_search($section, $sections);

			// Return index if found
			if ($index !== false) {
				return $index;
			}
		}

		// Return error message and value
		$this->error = array();
		$this->error['page'] = "Section '$section' was not found on this page";
		return -1;
	}
879557
public function removeProperty( $section, $key )
	{
		if( !$this->hasProperty( $section, $key ) )
			throw new InvalidArgumentException( 'Key "'.$key.'" is not existing in Section "'.$section.'".' );
		unset( $this->data[$section][$key] );
		return is_int( $this->write() );
	}
123558
public function get($section, $key){
		if(!isset($this->configValues[$section][$key])){
			return false;
		}
		return $this->configValues[$section][$key];
	}
20507
public function addSection($key, $value = null)
    {
        if ($key instanceof Section) {
            $section = $key;
            $this->sections[$section->getKey()]
                = $section->getValue();
            return;
        }
        $this->sections[$key] = (string)$value;
    }
705813
public function remove($section, $key): bool
    {
        if ($this->model->removeSetting($section, $key)) {
            if ($this->invalidateCache()) {
                return true;
            }
        }

        return false;
    }
1101695
public function get($section, $key)
    {
        foreach ($this->lines as $line) {
            if ($line['type'] != 'entry') {
                continue;
            }
            if ($line['section'] != $section) {
                continue;
            }
            if ($line['key'] != $key) {
                continue;
            }
            return $line['value'];
        }

        throw new RuntimeException('Missing Section or Key');
    }
117861
public function parseValue(string $section, string $key, $default = null)
    {
        if (isset($this->propertyData[$section]) && isset($this->propertyData[$section][$key])) {
            if ($this->propertyData[$section][$key] instanceof Secret) {
                return $this->propertyData[$section][$key];
            }

            return Parse::toType($this->propertyData[$section][$key]);
        }

        return $default;
    }
954923
public function findSectionsForPosition(Section $section)
    {
        $queryBuilder = $this->createQueryBuilder('section');
        $queryBuilder
            ->join('section.activeContribution', 'contribution')
            ->join('section.parent', 'parent')
            ->select('section.id, contribution.title, parent.id as parentId')
            ->andWhere('section.root = :rootId')
            ->andWhere(
                $queryBuilder->expr()->gt('section.level', 0)
            )
            ->andWhere($queryBuilder->expr()->not(
                $queryBuilder->expr()->andX(
                    $queryBuilder->expr()->gt('section.left', $section->getLeft()),
                    $queryBuilder->expr()->lt('section.right', $section->getRight())
                    )
                )
            )
            ->andWhere(
                $queryBuilder->expr()->orX(
                    'section.deleted = :deleted',
                    $queryBuilder->expr()->isNull('section.deleted')
                )
            )
            ->orderBy('section.root, section.left', 'ASC')
            ->setParameter('rootId', $section->getRoot())
            ->setParameter('deleted', false);

        return $queryBuilder->getQuery()->getArrayResult();
    }