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;
	}
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;
	}
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 ; }
Get the last node children. Null is returned if it hasn't any.
@return NodeAbstraction
@throws Exception\InvalidStructure if nested set structure is invalid
@nestedSetMethod
Get the last node children . Null is returned if it hasn t any .