Overview

Namespaces

  • Evenement
  • None
  • PHP
  • Psr
    • Http
      • Message
  • Ratchet
    • Http
    • RFC6455
      • Handshake
      • Messaging
    • Server
    • Session
      • Serialize
      • Storage
        • Proxy
    • Wamp
    • WebSocket
  • React
    • EventLoop
      • Tick
      • Timer
    • Socket
    • Stream
  • Symfony
    • Component
      • HttpFoundation
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
      • Routing
        • Annotation
        • Exception
        • Generator
          • Dumper
        • Loader
          • DependencyInjection
        • Matcher
          • Dumper
        • Tests
          • Annotation
          • Fixtures
            • AnnotatedClasses
            • OtherAnnotatedClasses
          • Generator
            • Dumper
          • Loader
          • Matcher
            • Dumper

Classes

  • Timer
  • Timers

Interfaces

  • TimerInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class Timer

React\EventLoop\Timer\Timer implements React\EventLoop\Timer\TimerInterface
Namespace: React\EventLoop\Timer
Located at Timer/Timer.php
Methods summary
public
# __construct( React\EventLoop\LoopInterface $loop, float $interval, callable $callback, boolean $periodic = false, mixed $data = null )

Constructor initializes the fields of the Timer

Constructor initializes the fields of the Timer

Parameters

$loop
React\EventLoop\LoopInterface
$loop The loop with which this timer is associated
$interval
float
$interval The interval after which this timer will execute, in seconds
$callback
callable
$callback The callback that will be executed when this timer elapses
$periodic
boolean
$periodic Whether the time is periodic
$data
mixed
$data Arbitrary data associated with timer
public React\EventLoop\LoopInterface
# getLoop( )

Get the loop with which this timer is associated

Get the loop with which this timer is associated

Returns

React\EventLoop\LoopInterface

Implementation of

React\EventLoop\Timer\TimerInterface::getLoop()
public float
# getInterval( )

Get the interval after which this timer will execute, in seconds

Get the interval after which this timer will execute, in seconds

Returns

float

Implementation of

React\EventLoop\Timer\TimerInterface::getInterval()
public callable
# getCallback( )

Get the callback that will be executed when this timer elapses

Get the callback that will be executed when this timer elapses

Returns

callable

Implementation of

React\EventLoop\Timer\TimerInterface::getCallback()
public
# setData( mixed $data )

Set arbitrary data associated with timer

Set arbitrary data associated with timer

Parameters

$data
mixed
$data

Implementation of

React\EventLoop\Timer\TimerInterface::setData()
public mixed
# getData( )

Get arbitrary data associated with timer

Get arbitrary data associated with timer

Returns

mixed

Implementation of

React\EventLoop\Timer\TimerInterface::getData()
public boolean
# isPeriodic( )

Determine whether the time is periodic

Determine whether the time is periodic

Returns

boolean

Implementation of

React\EventLoop\Timer\TimerInterface::isPeriodic()
public boolean
# isActive( )

Determine whether the time is active

Determine whether the time is active

Returns

boolean

Implementation of

React\EventLoop\Timer\TimerInterface::isActive()
public
# cancel( )

Cancel this timer

Cancel this timer

Implementation of

React\EventLoop\Timer\TimerInterface::cancel()
Constants summary
float MIN_INTERVAL 0.000001
#
Properties summary
protected mixed $loop
#
protected mixed $interval
#
protected mixed $callback
#
protected mixed $periodic
#
protected mixed $data
#
Ratchet API documentation generated by ApiGen 2.8.0