Common
[ class tree: Common ] [ index: Common ] [ all elements ]

Class: ProjectHandler

Source Location: /common/ProjectHandler.php

Class Overview


Handler for specific project files


Author(s):

Variables

Constants

Methods


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 37]

Map name without the project prefix



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


method getAvailableProjects [line 107]

array getAvailableProjects( )

Returns a list of available projects.



Tags:

return:  a string array of project names (identifiers)
access:  public


[ Top ]

method getMapName [line 54]

string getMapName( )



Tags:

access:  public


[ Top ]

method getPath [line 93]

string getPath( string $filePath, [string $file = ''])

Returns path for a file, depending on projects

FIXME: it should be simplier 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 49]

string getProjectName( )

Returns the project name



Tags:

access:  public
abstract:  


Overridden in child classes as:

ClientProjectHandler::getProjectName()
Returns project name
ServerProjectHandler::getProjectName()

[ Top ]

method getRootPath [line 43]

string getRootPath( )

Returns cartoserver or cartoclient root path.



Tags:

access:  public
abstract:  


Overridden in child classes as:

ClientProjectHandler::getRootPath()
ServerProjectHandler::getRootPath()

[ Top ]

method isProjectFile [line 65]

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 =  'default'

[line 31]


[ Top ]

PROJECT_DIR =  'projects'

[line 30]


[ Top ]



Documentation generated on Wed, 6 Apr 2005 12:06:51 +0200 by phpDocumentor 1.3.0RC3