Author: Frederik Holljen
Date: 2006-09-22 16:30:37 +0200 (Fri, 22 Sep 2006)
New Revision: 3534
Log:
- Some documentation fixes
- Added default identifier name "default" to signalcollections for lazy people
(like me).
Modified:
trunk/SignalObserver/src/internal/callback_comparer.php
trunk/SignalObserver/src/signal_collection.php
trunk/SignalObserver/src/static_connections.php
Modified: trunk/SignalObserver/src/internal/callback_comparer.php
===================================================================
--- trunk/SignalObserver/src/internal/callback_comparer.php 2006-09-22
14:29:10 UTC (rev 3533)
+++ trunk/SignalObserver/src/internal/callback_comparer.php 2006-09-22
14:30:37 UTC (rev 3534)
@@ -9,7 +9,7 @@
*/
/**
- * Check if two callback are the same or not.
+ * Check if two callbacks are the same or not.
*
* @version //autogen//
* @mainclass
Modified: trunk/SignalObserver/src/signal_collection.php
===================================================================
--- trunk/SignalObserver/src/signal_collection.php 2006-09-22 14:29:10 UTC
(rev 3533)
+++ trunk/SignalObserver/src/signal_collection.php 2006-09-22 14:30:37 UTC
(rev 3534)
@@ -9,7 +9,6 @@
/**
* ezcSignalCollection implements a mechanism for inter and intra object
communication.
- * TODO: order in which signals are called
* TODO: examples
*
* @property bool $signalsBlocked If set to true emits will not cause any
slots to be called.
@@ -52,7 +51,7 @@
*
* @param string $identifier
*/
- public function __construct( $identifier )
+ public function __construct( $identifier = "default" )
{
$this->properties['identifier'] = $identifier;
$this->signalsBlocked = false;
@@ -316,12 +315,5 @@
}
}
}
-
- // move to private class
- public function comp_func( $a, $b )
- {
- if( $a === $b ) return 0;
- return 1;
- }
}
?>
Modified: trunk/SignalObserver/src/static_connections.php
===================================================================
--- trunk/SignalObserver/src/static_connections.php 2006-09-22 14:29:10 UTC
(rev 3533)
+++ trunk/SignalObserver/src/static_connections.php 2006-09-22 14:30:37 UTC
(rev 3534)
@@ -21,7 +21,8 @@
* TODO: examples
*
* @property array $connections Holds the internal structure of signals. The
format is
- * array(priority=>array(slots)). It can be both read and set
in order
+ * 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.
*
* @version //autogen//
@@ -38,12 +39,17 @@
private $properties = array();
/**
- * ezcSignalStaticConnections singleton instance
+ * ezcSignalStaticConnections singleton instance.
*
* @var ezcConfigurationManager
*/
private static $instance = null;
+ /**
+ * Returns the instance of the ezcSignalStaticConnections..
+ *
+ * @return ezcConfigurationManager
+ */
public static function getInstance()
{
if( self::$instance === null )
@@ -53,6 +59,9 @@
return self::$instance;
}
+ /**
+ * Constructs a new empty static connections class.
+ */
private function __construct()
{
$this->properties['connections'] = array();
@@ -101,6 +110,14 @@
}
}
+ /**
+ * Returns all the connections for signals $signal in signal collections
+ * with the identifier $identifier.
+ *
+ * @param string $identifier
+ * @param string $signal
+ * @return array(int=>callback)
+ */
public function getConnections( $identifier, $signal )
{
if( isset( $this->connections[$identifier] ) &&
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components