X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fclasses%2Finterfaces%2Fregistry%2Fclass_Register.php;fp=inc%2Fclasses%2Finterfaces%2Fregistry%2Fclass_Register.php;h=a750ac1b3740bb44e1772b92d0aae4bf800a8bdd;hb=389f3abad52f9cde3323db5d3d187562fe801a71;hp=0000000000000000000000000000000000000000;hpb=1f1f351e726dae5d4cd25b46639c2fcaa9e38661;p=hub.git diff --git a/inc/classes/interfaces/registry/class_Register.php b/inc/classes/interfaces/registry/class_Register.php new file mode 100644 index 000000000..a750ac1b3 --- /dev/null +++ b/inc/classes/interfaces/registry/class_Register.php @@ -0,0 +1,52 @@ + + * @version 0.0.0 + * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +interface Register extends FrameworkInterface { + /** + * Checks wether an instance key was found + * + * @param $instanceKey The key holding an instance in the registry + * @return $exists Wether the key exists in the registry + */ + function instanceExists ($instanceKey); + + /** + * Adds/overwrites a new instance to the registry at the given key + * + * @param $instanceKey The key to identify the instance + * @param $objectInstance An instance we shall store + * @return void + */ + function addInstance ($instanceKey, Registerable $objectInstance); + + /** + * Gets a registered instance or null if not found + * + * @param $instanceKey The key to identify the instance + * @return $objectInstance An instance we shall store + */ + function getInstance ($instanceKey); +} + +// [EOF] +?>