/** * Returns true, if ext_update class says it wants to run. * * @param string $extensionKey extension key * @return mixed NULL, if update is not available, else update script return */ public function executeUpdateIfNeeded($extensionKey) { $this->requireUpdateScript($extensionKey); $scriptObject = new \ext_update(); // old em always assumed the method exist, we do so too. // @TODO: Make this smart, let scripts implement interfaces // @TODO: Enforce different update class script names per extension // @TODO: With different class names it would be easily possible to check for updates in list view. $accessReturnValue = $scriptObject->access(); $result = NULL; if ($accessReturnValue === TRUE) { // @TODO: With current ext_update construct it is impossible // @TODO: to enforce some type of return $result = $scriptObject->main(); } return $result; }