- // Then ask the goverment if they want to pay a "startup help" to the user
- if ($govermentInstance->ifGovermentAlreadyPayedStartupHelp()) {
+ // Then ask the government if they want to pay a "startup help" to the user
+ if ($governmentInstance->ifGovernmentAlreadyPayedTraining()) {
+ // Training already given!
+ $ifGovHelps = false;
+ } // END - if
+
+ // Return result here
+ return $ifGovHelps;
+ }
+
+ /**
+ * Determines if government can still pay a "startup help" to the user
+ *
+ * @return $ifGovHelps Wether if government helps the user with some startup money
+ */
+ public function ifGovernmentPaysStartupHelp () {
+ // By default they want to help.
+ $ifGovHelps = true;
+
+ // First get a government instance from registry
+ $governmentInstance = Registry::getRegistry()->getInstance('government');
+
+ // Is it there?
+ if (is_null($governmentInstance)) {
+ // Then create a new one
+ $governmentInstance = ObjectFactory::createObjectByConfiguredName('government_class', array($this));
+
+ // Store it in registry
+ Registry::getRegistry()->addInstance('government', $governmentInstance);
+ } // END - if
+
+ // Then ask the government if they want to pay a "startup help" to the user
+ if ($governmentInstance->ifGovernmentPayedMaxmimumStartupHelp()) {