root/trunk/src/main/php/net/stubbles/lang/stubObject.php

Revision 1209, 1.7 kB (checked in by mikey, 4 months ago)

first part of refactoring #119
This breaks star files, they will be fixed next.

Line 
1 <?php
2 /**
3  * Base interface for all stubbles classes except static ones and classes
4  * extending php built-in classes.
5  *
6  * @author      Frank Kleine  <mikey@stubbles.net>
7  * @package     stubbles
8  * @subpackage  lang
9  */
10 /**
11  * Base interface for all stubbles classes except static ones and classes
12  * extending php built-in classes.
13  *
14  * @package     stubbles
15  * @subpackage  lang
16  */
17 interface stubObject
18 {
19     /**
20      * returns class informations
21      *
22      * @return  stubReflectionObject
23      */
24     public function getClass();
25
26     /**
27      * returns package informations
28      *
29      * @return  stubReflectionPackage
30      */
31     public function getPackage();
32
33     /**
34      * returns the full qualified class name
35      *
36      * @return  string
37      */
38     public function getClassName();
39
40     /**
41      * returns the name of the package where the class is inside
42      *
43      * @return  string
44      */
45     public function getPackageName();
46
47     /**
48      * returns a unique hash code for the class
49      *
50      * @return  string
51      */
52     public function hashCode();
53
54     /**
55      * checks whether a value is equal to the class
56      *
57      * @param   mixed  $compare
58      * @return  bool
59      */
60     public function equals($compare);
61
62     /**
63      * returns a string representation of the class
64      *
65      * The result is a short but informative representation about the class and
66      * its values. Per default, this method returns:
67      * [fully-qualified-class-name] ' {' [members-and-value-list] '}'
68      * <code>
69      * example.MyClass {
70      *     foo(string): hello
71      *     bar(example::AnotherClass): example::AnotherClass {
72      *         baz(int): 5
73      *     }
74      * }
75      * </code>
76      *
77      * @return  string
78      */
79     public function __toString();
80 }
81 ?>
82
Note: See TracBrowser for help on using the browser.