public static function checkDependency( $component, $type, $value )
    {
        switch ( $type )
        {
            case self::DEP_PHP_EXTENSION:
                if ( extension_loaded( $value ) )
                {
                    return;
                }
                else
                {
                    // Can not be tested as it would abort the PHP script.
                    die( "\nThe {$component} component depends on the default PHP extension '{$value}', which is not loaded.\n" );
                }
                break;

            case self::DEP_PHP_VERSION:
                $phpVersion = phpversion();
                if ( version_compare( $phpVersion, $value, '>=' ) )
                {
                    return;
                }
                else
                {
                    // Can not be tested as it would abort the PHP script.
                    die( "\nThe {$component} component depends on the PHP version '{$value}', but the current version is '{$phpVersion}'.\n" );
                }
                break;
        }
    }
public static function checkDependency( $component, $type, $value )
    {
        switch ( $type )
        {
            case self::DEP_PHP_EXTENSION:
                if ( extension_loaded( $value ) )
                {
                    return;
                }
                else
                {
                    // Can not be tested as it would abort the PHP script.
                    die( "\nThe {$component} component depends on the default PHP extension '{$value}', which is not loaded.\n" );
                }
                break;

            case self::DEP_PHP_VERSION:
                $phpVersion = phpversion();
                if ( version_compare( $phpVersion, $value, '>=' ) )
                {
                    return;
                }
                else
                {
                    // Can not be tested as it would abort the PHP script.
                    die( "\nThe {$component} component depends on the PHP version '{$value}', but the current version is '{$phpVersion}'.\n" );
                }
                break;
        }
    }
public static function checkDependency ( $ component , $ type , $ value ) { switch ( $ type ) { case self :: DEP_PHP_EXTENSION : if ( extension_loaded ( $ value ) ) { return ; } else { // Can not be tested as it would abort the PHP script. die ( "\nThe {$component} component depends on the default PHP extension '{$value}', which is not loaded.\n" ) ; } break ; case self :: DEP_PHP_VERSION : $ phpVersion = phpversion ( ) ; if ( version_compare ( $ phpVersion , $ value , '>=' ) ) { return ; } else { // Can not be tested as it would abort the PHP script. die ( "\nThe {$component} component depends on the PHP version '{$value}', but the current version is '{$phpVersion}'.\n" ) ; } break ; } }
Checks for dependencies on PHP versions or extensions

The function as called by the $component component checks for the $type
dependency. The dependency $type is compared against the $value. The
function aborts the script if the dependency is not matched.

@param string $component
@param int $type
@param mixed $value
Checks for dependencies on PHP versions or extensions