]> git.mxchange.org Git - core.git/blob - framework/main/interfaces/class_FrameworkInterface.php
Continued:
[core.git] / framework / main / interfaces / class_FrameworkInterface.php
1 <?php
2 // Own namespace
3 namespace Org\Mxchange\CoreFramework\Generic;
4
5 /**
6  * This is the top-level interface for all other interfaces and should contain
7  * method stubs which is being used in every class
8  *
9  * @author              Roland Haeder <webmaster@shipsimu.org>
10  * @version             0.0.0
11  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
12  * @license             GNU GPL 3.0 or any newer version
13  * @link                http://www.shipsimu.org
14  * @todo                Find a better name for this interface
15  *
16  * This program is free software: you can redistribute it and/or modify
17  * it under the terms of the GNU General Public License as published by
18  * the Free Software Foundation, either version 3 of the License, or
19  * (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24  * GNU General Public License for more details.
25  *
26  * You should have received a copy of the GNU General Public License
27  * along with this program. If not, see <http://www.gnu.org/licenses/>.
28  */
29 interface FrameworkInterface {
30         // Exception constants
31         const EXCEPTION_INVALID_ARGUMENT     = 0x200;
32         const EXCEPTION_LOGIC_EXCEPTION      = 0x201;
33         const EXCEPTION_UNSPPORTED_OPERATION = 0x202;
34         const EXCEPTION_UNEXPECTED_VALUE     = 0x203;
35         const EXCEPTION_CLASS_NOT_FOUND      = 0x204;
36         const EXCEPTION_BAD_METHOD_CALL      = 0x205;
37         const EXCEPTION_OUT_OF_BOUNDS        = 0x206;
38         const EXCEPTION_IS_NULL_POINTER      = 0x207;
39
40         /**
41          * Getter for field name
42          *
43          * @param       $fieldName              Field name which we shall get
44          * @return      $fieldValue             Field value from the user
45          * @throws      NullPointerException    If the result instance is null
46          */
47         function getField (string $fieldName);
48
49         /**
50          * Checks if given field is set
51          *
52          * @param       $fieldName      Field name to check
53          * @return      $isSet          Whether the given field name is set
54          * @throws      NullPointerException    If the result instance is null
55          */
56         function isFieldSet (string $fieldName);
57
58         /**
59          * Setter for call-back instance
60          *
61          * @param       $callbackInstance       An instance of a FrameworkInterface class
62          * @return      void
63          */
64         function setCallbackInstance (FrameworkInterface $callbackInstance);
65
66         /**
67          * Checks whether an object equals this object. You should overwrite this
68          * method to implement own equality checks
69          *
70          * @param       $objectInstance         An instance of a FrameworkInterface object
71          * @return      $equals                         Whether both objects equals
72          */
73         function equals (FrameworkInterface $objectInstance);
74
75         /**
76          * Generates a code for hashes from this class
77          *
78          * @return      $hashCode       The hash code respresenting this class
79          */
80         function hashCode ();
81
82 }