Forked from eddieajau/libraries_cms_version_compatibility.php
Created
May 13, 2014 15:01
-
-
Save beingsane/445ef16ecaf90b4af13b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class JVersionCompatibility | |
| { | |
| /** | |
| * Class constructor. | |
| * | |
| * @param SimpleXmlElement $node The compatibility node from a manifest file. | |
| * | |
| * @see https://github.com/joomla/joomla-cms/issues/598 for XML specification. | |
| */ | |
| public function __construct(SimpleXmlElement $node); | |
| /** | |
| * Checks a version for compatibility. | |
| * | |
| * @param string $version The version to check. | |
| * | |
| * @return boolean True if the version meets the compatibility rules, false otherwise. | |
| */ | |
| public function check($version); | |
| /** | |
| * Gets the comment, if available from the previous call to the `check` method. | |
| * | |
| * @return string The comment from the compatibility rule that was matched when calling `check`. | |
| */ | |
| public function getComment(); | |
| } | |
| $vCheck = new JVersionCompatibility($xml->compatibility); | |
| $vCheck->check($versionToUpdateTo); | |
| $comment = $vCheck->getComment(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment