+ /**
+ * Books the given 'amount' in the request instance on the users 'points
+ * account'
+ *
+ * @param $requestInstance An instance of a Requestable class
+ * @return void
+ */
+ public function bookAmountDirectly (Requestable $requestInstance) {
+ // Init points instance
+ $pointsInstance = null;
+
+ try {
+ // Get the points class from registry
+ $pointsInstance = Registry::getRegistry()->getInstance('points');
+ } catch (NullPointerException $e) {
+ // Instance not found in registry
+ // @TODO We should log this later
+ }
+
+ // Is the points instance null?
+ if (is_null($pointsInstance)) {
+ // Then get a new one
+ $pointsInstance = ObjectFactory::createObjectByConfiguredName('user_points_class', array($this));
+
+ // And store it in registry
+ Registry::getRegistry()->addInstance('points', $pointsInstance);
+ } // END - if
+
+ // Get the amount
+ $amount = $requestInstance->getRequestElement('amount');
+
+ // Call the method for booking points
+ $pointsInstance->bookPointsDirectly($amount);
+ }
+