lib/AbstractPicoPlugin.php
protected function checkCompatibility()
    {
        if ($this->nativePlugin === null) {
            $picoClassName = get_class($this->pico);
            $picoApiVersion = defined($picoClassName . '::API_VERSION') ? $picoClassName::API_VERSION : 1;
            $pluginApiVersion = defined('static::API_VERSION') ? static::API_VERSION : 1;

            $this->nativePlugin = ($pluginApiVersion === $picoApiVersion);

            if (!$this->nativePlugin && ($pluginApiVersion > $picoApiVersion)) {
                throw new RuntimeException(
                    "Unable to enable plugin '" . get_called_class() . "': The plugin's API (version "
                    . $pluginApiVersion . ") isn't compatible with Pico's API (version " . $picoApiVersion . ")"
                );
            }
        }
    }
protected function checkCompatibility()
    {
        if ($this->nativePlugin === null) {
            $picoClassName = get_class($this->pico);
            $picoApiVersion = defined($picoClassName . '::API_VERSION') ? $picoClassName::API_VERSION : 1;
            $pluginApiVersion = defined('static::API_VERSION') ? static::API_VERSION : 1;

            $this->nativePlugin = ($pluginApiVersion === $picoApiVersion);

            if (!$this->nativePlugin && ($pluginApiVersion > $picoApiVersion)) {
                throw new RuntimeException(
                    "Unable to enable plugin '" . get_called_class() . "': The plugin's API (version "
                    . $pluginApiVersion . ") isn't compatible with Pico's API (version " . $picoApiVersion . ")"
                );
            }
        }
    }
protected function checkCompatibility ( ) { if ( $ this -> nativePlugin === null ) { $ picoClassName = get_class ( $ this -> pico ) ; $ picoApiVersion = defined ( $ picoClassName . '::API_VERSION' ) ? $ picoClassName :: API_VERSION : 1 ; $ pluginApiVersion = defined ( 'static::API_VERSION' ) ? static :: API_VERSION : 1 ; $ this -> nativePlugin = ( $ pluginApiVersion === $ picoApiVersion ) ; if ( ! $ this -> nativePlugin && ( $ pluginApiVersion > $ picoApiVersion ) ) { throw new RuntimeException ( "Unable to enable plugin '" . get_called_class ( ) . "': The plugin's API (version " . $ pluginApiVersion . ") isn't compatible with Pico's API (version " . $ picoApiVersion . ")" ) ; } } }
Checks compatibility with Pico's API version

Pico automatically adds a dependency to {@see PicoDeprecated} when the
plugin's API is older than Pico's API. {@see PicoDeprecated} furthermore
throws a exception when it can't provide compatibility in such cases.
However, we still have to decide whether this plugin is compatible to
newer API versions, what requires some special (version specific)
precaution and is therefore usually not the case.

@return void

@throws RuntimeException thrown when the plugin's and Pico's API aren't
compatible
Checks compatibility with Pico s API version