summaryrefslogtreecommitdiff
path: root/framework/IInstanceCheck.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2015-01-20 23:53:59 +0100
committerFabio Bas <ctrlaltca@gmail.com>2015-01-20 23:53:59 +0100
commitbbda6a710849a46de98937e85e96ea06abe333fd (patch)
tree8325563cd0e406f1f6347dc8ad29560240d16430 /framework/IInstanceCheck.php
parentca22da21b0cedab985e698f4dedf3ac1158a1487 (diff)
Once class per file: framework/*.php; removed pradolite
Diffstat (limited to 'framework/IInstanceCheck.php')
-rw-r--r--framework/IInstanceCheck.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/framework/IInstanceCheck.php b/framework/IInstanceCheck.php
new file mode 100644
index 00000000..8af12117
--- /dev/null
+++ b/framework/IInstanceCheck.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * TComponent, TPropertyValue classes
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ *
+ * Global Events, intra-object events, Class behaviors, expanded behaviors
+ * @author Brad Anderson <javalizard@mac.com>
+ *
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @package System
+ */
+
+
+/**
+ * IInstanceCheck This interface allows objects to determine their own
+ * 'instanceof' results when {@link TComponent::isa} is called. This is
+ * important with behaviors because behaviors may want to look like
+ * particular objects other than themselves.
+ *
+ * @author Brad Anderson <javalizard@mac.com>
+ * @version $Id$
+ * @package System
+ * @since 3.2.3
+ */
+interface IInstanceCheck {
+ /**
+ * The method checks $this or, if needed, the parameter $instance is of type
+ * class. In the case of a Class Behavior, the instance to which the behavior
+ * is attached may be important to determine if $this is an instance
+ * of a particular class.
+ * @param class|string the component that this behavior is checking if it is an instanceof.
+ * @param object the object which the behavior is attached to. default: null
+ * @return boolean|null if the this or the instance is of type class. When null, no information could be derived and
+ * the default mechanisms take over.
+ */
+ public function isinstanceof($class,$instance=null);
+} \ No newline at end of file