<?php
 
 
/**
 
 * Page DocBlock definition
 
 * @package org.zadara.marius.pax
 
 */
 
 
/**
 
 * Environment class definition.
 
 * 
 
 * @author Marius Zadara <[email protected]>
 
 * @category Classes
 
 * @copyright (C) 2008-2009 Marius Zadara
 
 * @license Free for non-comercial use
 
 * @package org.zadara.marius.pax
 
 * @final
 
 * @see PAXObject
 
 * @see IEnvironment
 
 * @version 6.0
 
 * @since 5.0 
 
 */
 
final class Environment extends PAXObject implements IEnvironment 
 
{
 
    /**
 
     * Class constructor.
 
     * 
 
     * @access public
 
     */
 
    public function __construct()
 
    {
 
        // call the parent constructor
 
        parent::__construct();
 
    }
 
    
 
    /**
 
     * Method to check if an PHP extension is loaded.
 
     *
 
     * @access public 
 
     * @static 
 
     * @param string </b>$extension</b> The extension name
 
     * @return boolean True/False as the extension is loaded or not
 
     */
 
    public static function isExtensionLoaded($extension)
 
    {
 
        // check if the extension has been loaded
 
        return @extension_loaded($extension);
 
    }
 
    
 
    /**
 
     * Method to load an extension.
 
     *
 
     * @access public
 
     * @static 
 
     * @param string <b>$extension</b> The extension name
 
     * @return boolean True/False as the extensions has been loaded or not
 
     */
 
    public static function loadExtension($extension)
 
    {
 
        // try to load the extension
 
        return @dl($extension);
 
    }
 
    
 
    
 
    /**
 
     * Method to check the version of the PHP.
 
     * 
 
     * @access public
 
     * @static 
 
     * @param string <b>$version</b> The minimal required PHP version
 
     * @return boolean 
 
     */
 
    public static function isMinimalPHP($version)
 
    {
 
        return version_compare(PHP_VERSION, $version) != (-1);
 
    }    
 
    
 
    
 
    /**
 
     * Class destructor.
 
     * 
 
     * @access public
 
     */    
 
    public function __destruct()
 
    {
 
        
 
    }
 
}
 
 
 
?>
 
 |