ezcSignalStaticConnections makes it possible to connect to signals through the signals identifier.
The static connections allow you to:
Source for this file: /SignalSlot/src/static_connections.php
Version: | //autogen// |
array | read/write |
$connections
Holds the internal structure of signals. The format is array( identifier => array( signalName => array(priority=>array(slots)) ) ). It can be both read and set in order to provide easy setup of the static connections from disk. |
public static ezcConfigurationManager |
getInstance(
)
Returns the instance of the ezcSignalStaticConnections.. |
public void |
connect(
$identifier
, $signal
, $slot
, [ $priority
= 1000] )
Connects the signal $signal emited by any ezcSignalCollection with the identifier $identifier to the slot $slot. |
public void |
disconnect(
$identifier
, $signal
, $slot
, [ $priority
= null] )
Disconnects the $slot from the $signal with identifier $identifier.. |
public array(int=>array(callback)) |
getConnections(
$identifier
, $signal
)
Returns all the connections for signals $signal in signal collections with the identifier $identifier. |
public mixed |
__get(
$name
)
Returns the property $name. |
public void |
__set(
$name
, $value
)
Sets the property $name to $value. |
Returns the instance of the ezcSignalStaticConnections..
Connects the signal $signal emited by any ezcSignalCollection with the identifier $identifier to the slot $slot.
To control the order in which slots are called you can set a priority from 1 - 65 536. The lower the number the higher the priority. The default priority is 1000. Slots with the same priority may be called with in any order.
A slot will be called once for every time it is connected. It is possible to connect a slot more than once.
See the PHP documentation for examples on the callback type. http://php.net/callback
We reccommend avoiding excessive usage of the $priority parameter since it makes it much harder to track how your program works.
Name | Type | Description |
---|---|---|
$identifier |
string | |
$signal |
string | |
$slot |
callback | |
$priority |
int |
Disconnects the $slot from the $signal with identifier $identifier..
If the priority is given it will try to disconnect a slot with that priority. If no such slot is found no slot will be disconnected.
If no priority is given it will disconnect the matching slot with the lowest priority.
Name | Type | Description |
---|---|---|
$identifier |
string | |
$signal |
string | |
$slot |
callback | |
$priority |
int |
Returns all the connections for signals $signal in signal collections with the identifier $identifier.
Name | Type | Description |
---|---|---|
$identifier |
string | |
$signal |
string |
Method | Description |
---|---|
ezcSignalStaticConnectionsBase::getConnections() |
Returns all the connections for signals $signal in signal collections with the identifier $identifier. |
Returns the property $name.
Name | Type | Description |
---|---|---|
$name |
string |
Type | Description |
---|---|
ezcBasePropertyNotFoundException |
if the property does not exist. |
Sets the property $name to $value.
Name | Type | Description |
---|---|---|
$name |
string | |
$value |
mixed |
Type | Description |
---|---|
ezcBasePropertyNotFoundException |
if the property does not exist. |