phing-util

# Class: PathTokenizer Source Location: /util/PathTokenizer.php
### Class Overview
A Path tokenizer takes a path and returns the components that make up that path. #### Author(s): Hans Lellelid <hans@xmpl.org> (Phing) Conor MacNeill (Ant) Jeff Tulley <jtulley@novell.com> (Ant) | ### Methods __construct contains hasMoreTokens nextToken
### Class Details [line 52] A Path tokenizer takes a path and returns the components that make up that path. The path can use path separators of either ':' or ';' and file separators of either '/' or '\'. #### Tags:
author: | Hans Lellelid <hans@xmpl.org> (Phing)
author: | Conor MacNeill (Ant)
author: | Jeff Tulley <jtulley@novell.com> (Ant)
[ Top ] ### Class Methods ### constructor __construct [line 104]
`PathTokenizer __construct( path $path)`
Constructs a path tokenizer for the specified path. #### Tags:
access: | public
#### Parameters:
path | $path | The path to tokenize. Must not be null .
[ Top ] ### method contains [line 234]
`boolean contains( string $path)`
Non StringTokenizer function, that indicates whether the specified path is contained in loaded tokens. We can do this easily because in PHP implimentation we're using arrays. #### Tags:
access: | public
#### Parameters:
string | $path | path to search for.
[ Top ] ### method hasMoreTokens [line 134]
``true` hasMoreTokens( )`
Tests if there are more path elements available from this tokenizer's path. If this method returns true , then a subsequent call to nextToken will successfully return a token. #### Tags:
return: | if and only if there is at least one token in the string after the current position; false otherwise.
access: | public
[ Top ] ### method nextToken [line 162]
`the nextToken( )`
Returns the next path element from this tokenizer. #### Tags:
return: | next path element from this tokenizer.
throws: | Exception if there are no more elements in this tokenizer's path.
access: | public
[ Top ] Documentation generated on Mon, 19 Oct 2009 10:51:24 +0200 by phpDocumentor 1.4.3