Common

# Class: ProjectHandler Source Location: /common/ProjectHandler.php
### Class Overview
Handler for specific project files #### Author(s): | ### Variables $mapName | ### Constants DEFAULT_PROJECT HIDDEN_PROJECTS PROJECT_DIR | ### Methods getAvailableProjects getMapName getPath getProjectName isProjectFile
### Child classes: ClientProjectHandler Project handler for the client ServerProjectHandler Project handler for the server
### Class Details [line 28] Handler for specific project files #### Tags:
abstract: |
[ Top ] ### Class Variables #### $mapName = [line 39] Map name without the project prefix #### Tags:
access: | public
Type: | string
[ Top ] ### Class Methods ### method getAvailableProjects [line 104]
`array getAvailableProjects( [boolean $returnHidden = false])`
Returns a list of available projects. #### Tags:
return: | a string array of project names (identifiers)
access: | public
#### Parameters:
boolean | $returnHidden | true to return hidden projects too
[ Top ] ### method getMapName [line 50]
`string getMapName( )`
#### Tags:
access: | public
[ Top ] ### method getPath [line 89]
`string getPath( string $filePath, [string $file = ''])`
Returns path for a file, depending on projects FIXME: it should be simpler to pass only a filename or directory, and let the caller do a dirname() or basename() from the result. If file exists in current project, path to project file name is returned. Otherwise, default file is returned. #### Tags:
access: | public
#### Parameters:
string | $filePath | path to file (without project specific path)
string | $file | optional file name
[ Top ] ### method getProjectName [line 45]
`string getProjectName( )`
Returns the project name #### Tags:
access: | public
abstract: |
Overridden in child classes as: ClientProjectHandler::getProjectName() Returns project name ServerProjectHandler::getProjectName() [ Top ] ### method isProjectFile [line 61]
`boolean isProjectFile( string $filePath, [string $file = ''])`
Finds out if a file or directory exists in project #### Tags:
return: | true if the file or directory belongs to a project.
access: | public
#### Parameters:
string | $filePath | path to file of directory (without project specific path)
string | $file | optional file name (if none, the test will be done on the direcory only)
[ Top ] ### Class Constants #### DEFAULT_PROJECT = 'test_main' [line 31] [ Top ] #### HIDDEN_PROJECTS = 'test_location_continuous, test_query_hilight, test_project' [line 32] [ Top ] #### PROJECT_DIR = 'projects' [line 30] [ Top ] Documentation generated on Fri, 21 Sep 2007 13:30:57 +0200 by phpDocumentor 1.3.0RC3