There is only one global preflight() and postflight() in an extension script.php file that you can use.
This is restrictive and you have to use your own identifiers to specify what actions occur for which versions, this can get quite complex when you do lots of changes between each version as they all have to go in these 2 functions
I have my own software where I have implemented version specific preflight() and postflight() functions and is very useful. It is not done in the same below, but i am trying to fit it into the Joomla paradigm.
Version specific preflight() and postflight() functions and they would be in the format such as:
The above function names take into account stability and stability subversion
The functions could be call with something like function_exists ( $function_name )
so they are only present if required.
The global preflight() and postflight() will still run as normal.
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-12-07 09:15:36 |
Closed_By | ⇒ | bembelimen |
For such things exists
version_compare()
https://www.php.net/manual/en/function.version-compare.phpthat you can run in your
preflight()
andpostflight()
Versioned
preflight()
andpostflight()
just adds complication in the core with a zero real profit