$__key ) ) return $container->$__key; // Try to load the object from the store. $r = static::load_from_store( $key ); $r = maybe_unserialize( $r ); if ( ! is_object( $r ) ) { // Backwards compatability: The Options_Object used to base64 encode the object. $r = base64_decode( $r ); $r = maybe_unserialize( $r ); // If there is still no object, just create a new one. if ( ! is_object( $r ) ) $r = new static(); } // Save to the cache. $container->$__key = $r; return $r; } /** @brief Internal method to try to load the object from the store. @since 2016-01-02 01:15:39 **/ public static function load_from_store( $key ) { throw new Exception( 'Please override the load_from_store method.' ); } /** @brief Save the object to the store. @since 2016-01-02 01:29:20 **/ public function save() { throw new Exception( 'Please override the store_key method.' ); } }