PHP Classes

File: core/classes/Environment.class.php

Recommend this page to a friend!
  Classes of Marius Zadara   PAX   core/classes/Environment.class.php   Download  
File: core/classes/Environment.class.php
Role: Class source
Content type: text/plain
Description: Environment class
Class: PAX
Interpret XML command scripts with PHP classes
Author: By
Last change: New version
Date: 15 years ago
Size: 1,780 bytes
 

Contents

Class file image Download
<?php

/**
 * Page DocBlock definition
 * @package org.zadara.marius.pax
 */

/**
 * Environment class definition.
 *
 * @author Marius Zadara <marius@zadara.org>
 * @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()
    {
       
    }
}


?>