getLastSection

@return Section
352401
protected function getLastSection()
    {
        if (0 === count($this->sections)) {
            throw new RenderException('Cannot end a section. You must start a section first.');
        }

        $keys = array_keys($this->sections);
        $key = array_pop($keys);

        return $this->sections[$key];
    }
668487
public function getLastSequenceNumber()
    {
        if (count($this->events) === 0) {
            return $this->lastCommittedSequenceNumber;
        }
        if ($this->lastSequenceNumber === null) {
            $event = end($this->events);
            $this->lastSequenceNumber = $event->getSequenceNumber();
        }
        return $this->lastSequenceNumber;
    }
514411
protected function _section_end()
    {
        $last = array_pop($this->_last_section);
        $this->_section_extend($last, ob_get_clean());

        return $last;
    }
418769
protected function getSection($sections, $section, $inheritance = false) {
		if (isset($sections[$section])) {
			return $sections[$section];
		}
		
		if ($inheritance) {
			foreach (array_keys($sections) as $part) {
				$colon = strpos($part, ':');

				if ($colon === false) {
					continue;
				}

				$successor = trim(substr($part, 0, $colon));
				$parent    = trim(substr($part, $colon + 1));
				
				if (! isset($successor[0], $parent[0])) {
					throw new InvalidIniSection('Invalid definition of the section "' . $part . '"');
				}

				if ($successor !== $section) {
					continue;
				}

				return array_replace(
					$this->getSection($sections, $parent, true),
					$sections[$part]
				);
			}
		}
		
		throw new InvalidIniSection('Section "' . $section . '" wasn\'t found');
	}
1138006
public function getLastChild()
	{
		if ( ! $this->hasChildren()) {
			return null;
		}
		$right = $this->getRightValue() - 1;

		$searchCondition = $this->repository->createSearchCondition()
				->rightEqualsTo($right);

		$lastChild = $this->repository->search($searchCondition);
		if ( ! isset($lastChild[0])) {
			$dump = static::dump($this);
			throw new Exception\InvalidStructure("Could not find the last child of {$dump} but it must exist");
		}
		$lastChild = $lastChild[0];
		
		return $lastChild;
	}
244524
public function getLastMoveIndex()
    {
        $move_history = $this->getMoveHistory();

        // get last value
        $last_move = end($move_history);

        // reset pointer
        reset($this->moves);

        return $last_move;
    }
309102
public function setSection(Section $section)
    {
        if ($section !== $this->_mainsection) {
            $this->_mainsection = null;
            $this->_level = $section->getLevel() + 1;
            if (0 === $this->_position) {
                $this->_position = 1;
            }
        }

        $this->_section = $section;

        return $this;
    }
484165
protected function endSection()
    {
        if (empty($this->scope->sectionStack)) {
            throw new InvalidArgumentException('Cannot end a section without first starting one.');
        }

        $last = array_pop($this->scope->sectionStack);
        $this->storeSection($last, ob_get_clean());
    }
88670
public function getLastPage()
    {
        return $this->hasResults() ? ceil($this->adapter->getTotalResults() / $this->limit) : $this->getFirstPage();
    }
625448
public function getSectionByName($name)
    {
        foreach ($this->sections as $i => $sec) {
            if ($sec instanceof Section) {
                if ($sec->getName() == $name) {
                    return $sec;
                }
            }
        }
        return null;
    }
1103688
public function getSection()
    {
        if (null === $this->_section) {
            $this->setSection(new Section($this->getUid(), array('page' => $this)));
        }

        return $this->_section;
    }
614202
private function get_target_section() {

        if (!$this->fixeddataset) {
            $key = rand(1, self::$paramsections[$this->size]);
        } else {
            // Using section 1.
            $key = 1;
        }

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

        return $this->compileParameters($section);
    }
605188
public function loadSections()
    {
        $response = $this->client->request(
            'GET',
            $this->requestParser->generate('sections'),
            new Message(
                array('Accept' => $this->outputVisitor->getMediaType('SectionList'))
            )
        );

        return $this->inputDispatcher->parse($response);
    }
870701
public function handleSection() {

        if ($ClassName = $this->owner->getRequest()->param('SECTIONNAME')) {
            $sections = $this->owner->data()->Sections();
            if ($section = $sections->filter(array('ClassName' => $ClassName))->first()) {
                if ($action = $this->owner->getRequest()->param('ACTION')) {
                    return $section->getController()->$action();
                }
            }
        }
        // return $section->getController();
    }
105967
public function findSection($name, Section $parent = null)
    {
        if (is_null($parent)) {
            $parent = $this->getRootSection();
        }

        return $parent->findSection($name);
    }
665104
public function last()
	{
		$set = array_slice($this->list, -1, 1, true);
		
		return isset($set[0]) ? $set[0] : null;
	}