src/UI/Template.php
public function getElementsFromComment( $comment, $unique = TRUE )
	{
		$content = $this->getTaggedComment( $comment );
		if( !isset( $content ) )
			return NULL;

		$list	= array();
		$content = explode( "\n", $content );
		foreach( $content as $row )
		{
			if( preg_match( '/\s*@(\S+)?\s+(.*)/', $row, $out ) )
			{
				if( $unique )
					$list[$out[1]] = $out[2];
				else
					$list[$out[1]][] = $out[2];
			}
		}
		return $list;
	}
public function getElementsFromComment( $comment, $unique = TRUE )
	{
		$content = $this->getTaggedComment( $comment );
		if( !isset( $content ) )
			return NULL;

		$list	= array();
		$content = explode( "\n", $content );
		foreach( $content as $row )
		{
			if( preg_match( '/\s*@(\S+)?\s+(.*)/', $row, $out ) )
			{
				if( $unique )
					$list[$out[1]] = $out[2];
				else
					$list[$out[1]][] = $out[2];
			}
		}
		return $list;
	}
public function getElementsFromComment ( $ comment , $ unique = TRUE ) { $ content = $ this -> getTaggedComment ( $ comment ) ; if ( ! isset ( $ content ) ) return NULL ; $ list = array ( ) ; $ content = explode ( "\n" , $ content ) ; foreach ( $ content as $ row ) { if ( preg_match ( '/\s*@(\S+)?\s+(.*)/' , $ row , $ out ) ) { if ( $ unique ) $ list [ $ out [ 1 ] ] = $ out [ 2 ] ; else $ list [ $ out [ 1 ] ] [ ] = $ out [ 2 ] ; } } return $ list ; }
Returns all marked elements from a comment.
@param		string		$comment		Comment Tag
@param		boolean		$unique			Flag: unique Keys only
@return		array						containing Elements or empty
Returns all marked elements from a comment .