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

Class: Console_Application_Concrete

Source Location: /tests/Console/Application/AbstractTest.php

Class Overview

Console_Application_Abstract
   |
   --Console_Application_Concrete

Template method class for CLI commands.


Author(s):

Copyright:

  • Copyright (c) 2009 Sven Strittmatter

Variables

Methods


Inherited Variables

Inherited Methods

Class: Console_Application_Abstract

Console_Application_Abstract::__construct()
On construction time a sapiCheck is done for CLI sapi.
Console_Application_Abstract::echoMsg()
Echoes a string appended with PHP_EOL.
Console_Application_Abstract::execute()
Template method. Try to run some method stubs in this order:
Console_Application_Abstract::findConsoleParameters()
This method listens by default to the console parameters -v and -h.
Console_Application_Abstract::getHelpMessage()
Returns a help message. Its called by default object behavier, if you suply -h to the script. By default it returns a line break formatted help message like:
Console_Application_Abstract::getUsage()
Returns a usage string like:
Console_Application_Abstract::iniSet()
This method wraps the php internal ini_set() that way, that it returns the old value.
Console_Application_Abstract::isExecuted()
Returns whether the application object is executed or not.
Console_Application_Abstract::isPcntlEnabled()
Console_Application_Abstract::isVerbose()
Returns whether the application object is verbose or not.
Console_Application_Abstract::onError()
This method is called if in the three followed methods a exception was
Console_Application_Abstract::registerSignalHandlers()
Registers some signal handlers:
Console_Application_Abstract::run()
You need to implement this method. Put your stuff to do here.
Console_Application_Abstract::setExecuted()
Sets object executed.
Console_Application_Abstract::setPhpEnviroment()
Sets the the php enviroment by ini settings to a proper default.
Console_Application_Abstract::setUp()
Template method stub. Overwrite this method to hook the set up phase of your script. This method is called after Console_Application_Abstract::findConsoleParameters(), unless it returns false. And before Console_Application_Abstract::run().
Console_Application_Abstract::signalHangUp()
Signal handler registered by Console_Application_Abstract::registerSignalHandlers().
Console_Application_Abstract::signalInt()
Signal handler registered by Console_Application_Abstract::registerSignalHandlers().
Console_Application_Abstract::signalTerm()
Signal handler registered by Console_Application_Abstract::registerSignalHandlers().
Console_Application_Abstract::tearDown()
Template method stub. Overwrite this method to hook the tear down phase of your script. This method is called after Console_Application_Abstract::run(), unless any exception was throwed.

Class Details

[line 36]
Template method class for CLI commands.



Tags:

copyright:  Copyright (c) 2009 Sven Strittmatter


[ Top ]


Class Variables

static $disablePcntl =  false

[line 52]



Tags:

access:  public

Type:   mixed


[ Top ]

$findConsoleParametersCalled =  false

[line 40]



Tags:

access:  public

Type:   mixed


[ Top ]

$onErrorCalled =  false

[line 43]



Tags:

access:  public

Type:   mixed


[ Top ]

$retValFindParams =  true

[line 45]



Tags:

access:  public

Type:   mixed


[ Top ]

$runCalled =  false

[line 41]



Tags:

access:  public

Type:   mixed


[ Top ]

$setUpCalled =  false

[line 39]



Tags:

access:  public

Type:   mixed


[ Top ]

$sigHangUpCalled =  false

[line 50]



Tags:

access:  public

Type:   mixed


[ Top ]

$sigIntCalled =  false

[line 49]



Tags:

access:  public

Type:   mixed


[ Top ]

$sigTermCalled =  false

[line 48]



Tags:

access:  public

Type:   mixed


[ Top ]

$tearDownCalled =  false

[line 42]



Tags:

access:  public

Type:   mixed


[ Top ]

$thowsExceptionInRun =  false

[line 46]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


method findConsoleParameters [line 72]

void findConsoleParameters( )



Tags:

access:  protected


Overrides Console_Application_Abstract::findConsoleParameters() (This method listens by default to the console parameters -v and -h.)

[ Top ]

method getCallCounter [line 54]

void getCallCounter( )



Tags:

access:  protected


[ Top ]

method isPcntlEnabled [line 88]

void isPcntlEnabled( )



Tags:

access:  protected


Overrides Console_Application_Abstract::isPcntlEnabled() (parent method not documented)

[ Top ]

method onError [line 83]

void onError( $errorData)



Tags:

access:  protected


Overrides Console_Application_Abstract::onError() (This method is called if in the three followed methods a exception was)

Parameters:

   $errorData  

[ Top ]

method run [line 59]

void run( )



Tags:

access:  protected


Overrides Console_Application_Abstract::run() (You need to implement this method. Put your stuff to do here.)

[ Top ]

method setUp [line 67]

void setUp( [ $maxExecutionTime = 10], [ $memoryLimit = '32M'])



Tags:

access:  protected


Overrides Console_Application_Abstract::setUp() (Template method stub. Overwrite this method to hook the set up phase of your script. This method is called after Console_Application_Abstract::findConsoleParameters(), unless it returns false. And before Console_Application_Abstract::run().)

Parameters:

   $maxExecutionTime  
   $memoryLimit  

[ Top ]

method signalHangUp [line 105]

void signalHangUp( $signal)



Tags:

access:  public


Overrides Console_Application_Abstract::signalHangUp() (Signal handler registered by Console_Application_Abstract::registerSignalHandlers().)

Parameters:

   $signal  

[ Top ]

method signalInt [line 101]

void signalInt( $signal)



Tags:

access:  public


Overrides Console_Application_Abstract::signalInt() (Signal handler registered by Console_Application_Abstract::registerSignalHandlers().)

Parameters:

   $signal  

[ Top ]

method signalTerm [line 96]

void signalTerm( $signal)



Tags:

access:  public


Overrides Console_Application_Abstract::signalTerm() (Signal handler registered by Console_Application_Abstract::registerSignalHandlers().)

Parameters:

   $signal  

[ Top ]

method tearDown [line 78]

void tearDown( )



Tags:

access:  protected


Overrides Console_Application_Abstract::tearDown() (Template method stub. Overwrite this method to hook the tear down phase of your script. This method is called after Console_Application_Abstract::run(), unless any exception was throwed.)

[ Top ]


Documentation generated on Mon, 17 Aug 2009 15:52:21 +0200 by phpDocumentor 1.4.2