public function getNumItems($recursive = false)
	{
		if ($recursive)
		{
			$count = $this->numitems;

			foreach ($this->getChildren() as $child)
			{
				$count = $count + $child->getNumItems(true);
			}

			return $count;
		}

		return $this->numitems;
	}
public function getNumItems($recursive = false)
	{
		if ($recursive)
		{
			$count = $this->numitems;

			foreach ($this->getChildren() as $child)
			{
				$count = $count + $child->getNumItems(true);
			}

			return $count;
		}

		return $this->numitems;
	}
public function getNumItems ( $ recursive = false ) { if ( $ recursive ) { $ count = $ this -> numitems ; foreach ( $ this -> getChildren ( ) as $ child ) { $ count = $ count + $ child -> getNumItems ( true ) ; } return $ count ; } return $ this -> numitems ; }
Returns the number of items.

@param   boolean  $recursive  If false number of children, if true number of descendants

@return  integer  Number of children or descendants

@since 11.1
Returns the number of items .