Class ATimer

Description

Alia Javascript timer

ATimer is a javascript timer for Alia applications. If the timer is set to singleshot, the timer will run once, and once $interval has passed, the timeout signal will be emitted. If the timer's singleshot is set to false, the timer will continue to run every $interval milliseconds.

Note that this is a javascript timer: the timer will not actually start until the data is sent back to the client.

  • author: Jordan CM Wambaugh <jordan@wambaugh.org>
  • signal: timeout Emitted every time the timer times out (every interval)

Located in /lib/ATimer.php (line 24)

AObject
   |
   --ATimer
Variable Summary
 bool $active
 int $interval
Method Summary
 ATimer __construct ([ $interval = null], [ $singleshot = false])
 void setInterval (unknown_type $interval)
 void setSingleShot (bool $val)
 void start ()
 void stop ()
Variables
bool $active = false (line 47)

Whether the timer is currently running

  • access: private
int $interval (line 31)

Milliseconds till timeout is emitted

bool $singleshot = false (line 40)

Whether the timer is singleshot or not.

singleshot timers only run once. If this is set to false, the timer will continue to emit the timeout signal continuosly every $interval number of milliseconds.

  • access: private

Inherited Variables

Inherited from AObject

AObject::$__connections
AObject::$__objectID
AObject::$__signalDefinitions
Methods
Constructor __construct (line 49)
  • access: public
ATimer __construct ([ $interval = null], [ $singleshot = false])
  • $interval
  • $singleshot

Redefinition of:
AObject::__construct()
setInterval (line 70)

sets the intervals between timeouts (in milliseconds)

void setInterval (unknown_type $interval)
  • unknown_type $interval
setSingleShot (line 79)

Sets whether the timer should repeat or just run once.

  • access: public
void setSingleShot (bool $val)
  • bool $val: true if only runs once, false to run repeatedly
start (line 99)

Starts the timer

  • access: public
void start ()
stop (line 87)

stops the timer

  • access: public
void stop ()

Inherited Methods

Inherited From AObject

 AObject::__construct()
 AObject::addConnection()
 AObject::clearConnections()
 AObject::defineSignal()
 AObject::emit()
 AObject::getObjectID()
 AObject::hasConnection()
 AObject::setObjectID()
 AObject::__hasSignalDefinition()

Documentation generated on Fri, 11 Jul 2008 13:28:43 -0400 by phpDocumentor 1.4.2