Returns the last child of node

@return Element|null
494370
public function lastChild()
    {
        $node = $this->node->lastChild;

        if ($node === null) {
            return null;
        }

        return new Element($node);
    }
1024302
public function getParent()
    {
        $section = $this->getSection();
        if ($this->hasMainSection()) {
            if ($section->isRoot()) {
                return null;
            } elseif ($section->getParent() instanceof Section) {
                return $section->getParent()->getPage();
            } else {
                return null;
            }
        }

        return $section->getPage();
    }
248964
public function getFirst()
    {
        $element = null;

        if (
            $this->hasParent() and
            $this->parent->hasElements()
        ) {
            $element = $this->parent->elements[0];
        }

        return $element;
    }
36491
public function getLast()
    {
        if (0 === $this->count()) {
            return null;
        }

        end($this->data);

        return current($this->data);
    }
1206341
public function last()
    {
        $keys = AccessHelper::collectionKeys($this->data);

        if (empty($keys)) {
            return null;
        }

        $value = $this->data[end($keys)] ? $this->data[end($keys)] : null;

        return AccessHelper::isCollectionType($value) ? new static($value, $this->options) : $value;
    }
69950
function getLastChild(elem) {
        //Current element has children, need to go deeper and get last child as a text node
        if (elem.lastChild.children && elem.lastChild.children.length > 0) {
          return getLastChild(Array.prototype.slice.call(elem.children).pop());
        }
        //This is the absolute last child, a text node, but something's wrong with it. Remove it and keep trying
        else if (!elem.lastChild || !elem.lastChild.nodeValue || elem.lastChild.nodeValue === '' || elem.lastChild.nodeValue == opt.truncationChar) {
          elem.lastChild.parentNode.removeChild(elem.lastChild);
          return getLastChild(element);
        }
        //This is the last child we want, return it
        else {
          return elem.lastChild;
        }
      }
424033
public function getLast()
    {
        if ($this->isEmpty()) {
            return null;
        }

        $this->seek(count($this->positions) - 1);

        return $this->current();
    }
1196549
protected function getLastChildPosition()
    {
        $lastChild = $this->getLastChild([$this->getPositionColumn()]);

        return (is_null($lastChild) ? 0 : $lastChild->position);
    }
2119
public function prev()
    {
        return $this->getParent() !== null ? $this->getParent()->getChildByIndex($this->getIndex() - 1) : null;
    }
992857
public function pop()
    {
        if (0 === count($this->array)) {
            return null;
        }

        // get the last hash of array
        end($this->array);
        $hash = key($this->array);

        // temporarily hold the element at that spot
        $element = $this->array[$hash];

        // forget it in our map and return our temporary
        $this->forget($this->hash_to_key($hash));

        return $element;
    }
1233378
public Node lastChild() {

		if (currentNode == null)
			return null;

		Node node = getLastChild(currentNode);

		if (node != null)
			currentNode = node;

		return node;
	}
247539
public function tail()
    {
        $last = count($this->parts) - 1;
        if ($last < 0) {
            return null;
        }

        return $this->parts[$last];
    }
914107
protected function NextItem()
	{
		// return null;
		$nodeTest = XmlQualifiedNameTest::Create();

		while ( true )
		{
			if ( ! $this->iterator->MoveNext() )
			{
				return null;
			}

			$node = $this->iterator->getCurrent();

			// An element with children cannot be an ID
			if ( $node->getHasChildren() ) continue;

			// Is this element a type?
			// $info = $node->getSchemaInfo();
			$type = $this->types->getElement( $node->LocalName, $node->Prefix == "" ? null : $node->Prefix );
			if ( $type )
			{
				return CoreFuncs::CloneInstance( $node );
			}
			else
			{
				// Look at the attributes
				if ( ! $node->getHasAttributes() ) continue;
				$attribs = AttributeNodeIterator::fromNodeTest( $this->context, $nodeTest, XPath2NodeIterator::Create( $node ) );
				foreach ( $attribs as $attribute )
				{
					$info = $attribute->getSchemaInfo();
					$type = $this->types->getAttribute( $attribute->LocalName, $info->Prefix == "" ? SCHEMA_PREFIX : $info->Prefix );
					if ( ! $type ) continue;
					foreach ( $type['types'] as $type )
					{
						if ( $type['prefix'] != SCHEMA_PREFIX ||
							 $type['name'] != ( $this->type ? "IDREF" : "ID" ) ||
							 ! in_array( $attribute->getValue(), $this->IDRef )
						) continue;
						return CoreFuncs::CloneInstance( $this->type ? $attribute : $node );
					}
					// if ( $attribute->LocalName == "anId" && in_array( $attribute->getValue(), $this->IDRef ) )
					// {
					// 	return CoreFuncs::CloneInstance( $node );
					// }
				}
			}
		}
	}
125548
public function firstChild()
    {
        $node = $this->node->firstChild;

        if ($node === null) {
            return null;
        }

        return new Element($node);
    }
1310329
public function prev()
    {

        $index = $this->parent->indexOf($this) - 1;

        return isset($this->parent->children[$index]) ? $this->parent->children[$index] : null;
    }
1174900
public function getFirstChild()
	{
		$xpathStr = self::XPATH_THIS . '*[1]';
		$results = $this->xpath($xpathStr);
		if (count($results) >= 1) {
			return $results[0];
		}
		return null;
	}
902435
public function getIsNode()
	{
		return ! is_null( $this->domNode ) && isset( DOMXPathNavigator::$nodeTypeMap[ $this->domNode->nodeType ] );
	}