@param string $sectionName

@throws \Spryker\Install\Stage\Section\Exception\SectionNotFoundException

@return \Spryker\Install\Stage\Section\SectionInterface
434766
public function getSection(string $sectionName): SectionInterface
    {
        if (!isset($this->sections[$sectionName])) {
            throw new SectionNotFoundException(sprintf('Section "%s" not found in "%s" stage', $sectionName, $this->name));
        }

        return $this->sections[$sectionName];
    }
1330776
public function parseSection($name, array $section)
    {
        $name = explode(':', $name, 2);

        $class = $this->findSection($name[0]);

        if (isset($name[1])) {
            return new $class($name[1], $section);
        }

        return new $class($section);
    }
1159323
public final function section(string $sectionName, bool $required = false)
    {
        if ($this->child) {
            if (method_exists($this->child, "render_$sectionName")) {
                call_user_func([$this->child, "render_$sectionName"]);
            } elseif ($required) {
                $childClass = get_class($this->child);
                throw new \BadMethodCallException("Method render_$sectionName is not defined in the child view $childClass.");
            }
        } elseif ($required) {
            $className = get_class($this);
            throw new \BadMethodCallException("Child view is undefined for view $className.");
        }
    }
247672
public function renderSectionFooter(string $sectionName = '') : void
    {
        foreach ($this->writers as $writer) {
            $writer->renderSectionFooter($sectionName);
        }
    }
253923
public function addSection(SectionInterface $section): StageInterface
    {
        if (isset($this->sections[$section->getName()])) {
            throw new SectionExistsException(sprintf('Section with name "%s" already exists.', $section->getName()));
        }

        $this->sections[$section->getName()] = $section;

        return $this;
    }
242655
public function getSection($sectionName)
    {
        if (!$this->hasSection($sectionName))
        {
            throw new InvalidDataException(sprintf('Section "%s" does not exists!', $sectionName));
        }

        return $this->sections[$sectionName];
    }
983233
public function getCache($sectionKey, &$section)
    {
        do_action("before_theme_get_cache", $sectionKey);

        $cacheKey = $this->getCacheKey($sectionKey, $section);

        # Get cache file absolute path
        $file = $this->getCacheFile($cacheKey);

        # Define variable with false
        $cache = false;

        $cacheConfig = $this->getConfig("cache");

        # TODO: When not redis, than wp_cache wont load from cache
        # Get cached html depending on cache type
        if ($cacheConfig["type"] == "wp_cache"):
            $cache = wp_cache_get(basename($file), "sections_cache");
        else:
            if (file_exists($file) && (time() - filemtime($file) < $cacheConfig["lifetime"])):
                $cache = file_get_contents($file);
            endif;
        endif;

        do_action("after_ntl_get_cache", $cache);

        # Return cached html
        return $cache;
    }
357189
protected function create($step)
    {
        foreach (array('name', 'identifier') as $key) {
            if (!isset($step->dsl[$key])) {
                throw new \Exception("The '$key' key is missing in a section creation definition");
            }
        }

        $sectionService = $this->repository->getSectionService();

        $sectionCreateStruct = $sectionService->newSectionCreateStruct();

        $sectionIdentifier = $this->referenceResolver->resolveReference($step->dsl['identifier']);
        $sectionCreateStruct->identifier = $sectionIdentifier;
        $sectionCreateStruct->name = $this->referenceResolver->resolveReference($step->dsl['name']);

        $section = $sectionService->createSection($sectionCreateStruct);

        $this->setReferences($section, $step);

        return $section;
    }
213389
public static function create_from_section($section) {
        $event = self::create([
            'context' => \context_course::instance($section->course),
            'objectid' => $section->id,
            'other' => ['sectionnum' => $section->section]
        ]);
        $event->add_record_snapshot('course_sections', $section);
        return $event;
    }
986184
protected function loadYamlFile( $fileName )
	{
		$array	= FS_File_YAML_Reader::load( $fileName );
		foreach( $array as $sectionName => $sectionData )
			foreach( $sectionData as $key => $value )
				$this->pairs[$sectionName.".".$key]	= $value;
	}
1114690
public function sectionAction($name)
    {
        $section = $this->getGenerator()->fetch($name);

        if (!$section) {
            throw $this->createNotFoundException();
        }

        $response = Response::create($section->toXml());
        $response->setPublic();
        $response->setClientTtl($this->getTtl());

        return $response;
    }
440995
public function getCategories($domainName, $sectionName): Finder
    {
        if (!in_array($sectionName, $this->getSectionNames($domainName))) {
            throw new \Exception('Section not found for given domain');
        }

        return (new Finder())
            ->directories()
            ->in(__DIR__.DIRECTORY_SEPARATOR.$domainName.DIRECTORY_SEPARATOR.$sectionName)
            ->depth(0)
        ;
    }
292768
public function addSection(PHPRtfLite_Container_Section $section = null)
    {
        if ($section === null) {
            $section = new PHPRtfLite_Container_Section($this);
        }

        $this->_sections[] = $section;

        return $section;
    }
744950
public static function load( $fileName )
	{
		if( !file_exists( $fileName ) )
			throw new Exception( 'File "'.$fileName.'" is not existing.' );

		$reader	= new FS_File_Reader( $fileName );
		$lines	= $reader->readArray();
		
		$list	= array();
		foreach( $lines as $line )
		{
			$line = trim( $line );
			if( !$line )
				continue;
			if( preg_match( self::$commentPattern, $line ) )
				continue;
					
			if( preg_match( self::$sectionPattern, $line ) )
			{
				$section = substr( $line, 1, -1 );
				if( !isset( $list[$section] ) )
					$list[$section]	= array();
			}
			else if( $section )
				$list[$section][]	= $line;
		}
		return $list;
	}
539168
public function addCommand(CommandInterface $command): SectionInterface
    {
        if (isset($this->commands[$command->getName()])) {
            throw new CommandExistsException(sprintf('Command with name "%s" already exists.', $command->getName()));
        }
        $this->commands[$command->getName()] = $command;

        return $this;
    }
422192
public function deleteSection(
        SectionDeleteData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('delete-section-%d', $data->getSection()->id);

        return $this->formFactory->createNamed($name, SectionDeleteType::class, $data);
    }
67007
public function updateSection(
        SectionUpdateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('update-section-%d', $data->getSection()->id);

        return $this->formFactory->createNamed($name, SectionUpdateType::class, $data);
    }