X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fconfig%2Fclass_FrameworkConfiguration.php;h=c69bd5ef892a33c12572b4b63aae00c7d28b937e;hp=65d742b5e22fbad84204ec309ab9dc079e0ba8a7;hb=83ceb6f4eb20c78b5e83842bf3bb84cd5758a647;hpb=84e2207412d3c6ea9f940a83b2cdd4503509808a diff --git a/inc/config/class_FrameworkConfiguration.php b/inc/config/class_FrameworkConfiguration.php index 65d742b5..c69bd5ef 100644 --- a/inc/config/class_FrameworkConfiguration.php +++ b/inc/config/class_FrameworkConfiguration.php @@ -65,7 +65,7 @@ class FrameworkConfiguration implements Registerable { * * @return $configInstance An instance of this class */ - public final static function getInstance () { + public static final function getInstance () { // is the instance there? if (is_null(self::$configInstance)) { // Create a config instance @@ -318,7 +318,26 @@ class FrameworkConfiguration implements Registerable { public function hashCode () { return crc32($this->__toString()); } + + /** + * Checks wether an object equals this object. You should overwrite this + * method to implement own equality checks + * + * @param $objectInstance An instance of a FrameworkInterface object + * @return $equals Wether both objects equals + */ + public function equals (FrameworkInterface $objectInstance) { + // Now test it + $equals = (( + $this->__toString() == $objectInstance->__toString() + ) && ( + $this->hashCode() == $objectInstance->hashCode() + )); + + // Return the result + return $equals; + } } -// +// [EOF] ?>