[ Index ]
 

Code source de Plume CMS 1.2.2

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/manager/inc/ -> class.installer.php (sommaire)

(pas de description)

Poids: 370 lignes (11 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Installer:: (15 méthodes):
  Installer()
  save()
  load()
  addPage()
  addQuestion()
  addTest()
  runPageTests()
  getPercentage()
  getNextPage()
  getPrevPage()
  getAns()
  setAns()
  loadConfigFile()
  getPageQuestions()
  getQuestionHtml()


Classe: Installer  - X-Ref

Class managing the installation process.

Installer()   X-Ref
Constructor.


save()   X-Ref
Save the answers in the session.

return: bool Success

load()   X-Ref
Load the answers from the session.

return: bool Success

addPage($id, $title='', $desc='')   X-Ref
Add a page in the installer.

Set the cursor to the current page.

param: string Id of the page. It must be unique
param: string Title of the page ('')
param: string Description of the page ('')
return: bool Success

addQuestion($id, $question, $type='text', $answer='', $helpid='')   X-Ref
Add a question to the current page.

param: string Id of the question. Must be unique.
param: string The question
param: string Type of answer ('text'), 'combobox', 'password',
param: mixed Values for answers, combobox values with default choice
param: string Help id, to display corresponding help ('')
return: bool Success

addTest($id, $func, $good='', $bad='', $warn='')   X-Ref
Add a test to the current page.

To validate a page, all the tests of the page are run. A test has
3 possible results success, failure or warning.

The test function is used to run tests but also to perform installation
action. The test is not "run" at the time the test is added, but when
when the runPageTests() or runAllTests() are called.
A test function must have this declaration:
array(test result, message) = func(&$installer instance, $messageok,
$messagebad, $messagewrning)
Through the Installer instance a test function can access the answers
to all the questions given during the installation procedure.

param: string Test id. Must be unique.
param: string Test function to call.
param: string Good message ('')
param: string Bad message ('')
param: string Warning message ('')
return: bool Success of the test addition

runPageTests($pageid, $level=PX_TEST_WARNING)   X-Ref
Run the tests of a given page.

param: string Id of the page
param: int Return false on warning (PX_TEST_WARNING) or only errors
return: bool Success

getPercentage()   X-Ref
Get percentage done.

return: int Percentage of the steps done.

getNextPage()   X-Ref
Get next page id.

return: mixed Id of the next page or false

getPrevPage()   X-Ref
Get previous page id.

return: mixed Id of the previous page or false

getAns($what)   X-Ref
Get an answer.

param: string What to get
return: string The answer

setAns($what, $ans)   X-Ref
Set an answer.

param: string What to set
param: string The answer

loadConfigFile()   X-Ref
Load config file if exists.

return: bool Success to load it.

getPageQuestions($id)   X-Ref
Return the HTML of the questions.

param: string Page id
return: string HTML of the page content

getQuestionHtml($q)   X-Ref
Return the HTML of a question

param: array Definition of the question
return: string HTML of the question



Généré le : Mon Nov 26 11:57:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics