xplo.re Medusa Core Framework 3.1
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Event
  • Todo
  • Download

Namespaces

  • Core
    • Authentication
      • Auto
        • Driver
      • Driver
    • Cache
      • Driver
    • Charset
      • Driver
    • Configuration
    • Controller
    • Converter
      • Driver
    • Decoder
      • Driver
    • Encoder
      • Driver
    • Env
      • Authentication
      • Locale
      • Proxy
      • Server
        • HTTP
        • Redirect
        • X
    • Exception
    • Exchange
      • Driver
    • Field
    • Filter
      • Driver
    • Formatter
      • Driver
        • coreuimarkup
          • Token
    • Hash
    • Loader
    • Locale
    • Log
      • Driver
    • Module
      • Dependency
        • Requirement
          • Core
          • PHP
      • Linkage
        • Driver
    • PDF
    • Plugin
    • Query
      • Driver
    • Server
      • Driver
    • Session
      • Driver
    • Set
    • Storage
      • Driver
      • Field
        • Element
    • Stream
      • Driver
    • String
    • Translation
      • Driver
      • Language
        • Driver
    • URI
      • Driver
    • Version
    • View
      • Driver
        • coreui
          • Control
            • Button
            • Table
          • Element
        • htmlbuilder
          • Tags
        • yui
          • Modules
  • None
  • PHP

Classes

  • Authentication
  • Authentication_Token
  • Autoloader
  • Cache
  • Charset
  • ClassDescriptor
  • Closure
  • Controller
  • Converter
  • Date
  • Decoder
  • Delegate
  • Dispatcher
  • Encoder
  • Env
  • Env_Field
  • Env_File
  • Env_FileList
  • Env_Request
  • Env_SERVER
  • Exchange
  • Fault
  • Field
  • Filter
  • Filter_Value
  • Formatter
  • Hash
  • IP
  • Loader
  • Locale
  • Locale_Iterator
  • Locale_Node
  • Log
  • Module
  • Module_Iterator
  • Nothing
  • Object
  • OS
  • Plugin
  • Profiler
  • Query
  • Registry
  • Resource
  • Server
  • Session
  • Session_Token
  • Set
  • Storage
  • Storage_Result
  • Storage_Statement
  • Stream
  • String
  • Translation
  • URI
  • URI_Parameters
  • UUID
  • Value
  • Version
  • View

Interfaces

  • Accessor
  • Chainable
  • Comparable
  • Configurable
  • Equality
  • Identity
  • Inquiry
  • Masquerade
  • Mutator
  • SeekableStream
  • Storable
  • Variator

Exceptions

  • Exception

Constants

  • Copyright
  • ProductName
  • UseVersion
  • Version

Functions

  • ns_expand
  • ns_file_exists
  • ns_get_version
  • ns_resolve

Class Env

Provides access to environmental values.

Environmental values are grouped into categories that are accessible through different global variables in PHP. Environment access is available by several static calls to the corresponding names of the global variables. Depending on the type of global variable, special support functions may be available to ease access. It is possible to extend the environment system for additional globals by providing corresponding Env_VariableName classes.

Core\Object implements Core\Chainable
Extended by Core\Env
Namespace: Core
Package: Core\Env
Since: 3.1
Requires: PHP 5.3
Version: 2.1
Located at Env.inc.php

Methods summary

public static Core\Env_Field|Core\Value[]|mixed[]
# __callStatic( string $group, array $keys )

Retrieves the environment interface for an environment group or directly retrieves values from that group.

Retrieves the environment interface for an environment group or directly retrieves values from that group.

Parameters

$group

Environment group name to get interface of. Name is automatically converted to uppercase and equals the called static function name.

$keys

Array of call arguments. Determines the return type of the method.

  • If not provided or an empty array, the method returns the interface object for the requested environmental group.

  • If a simple array with key names, an array is returned with the environment group values for each key respectively, wrapped as Core\Value instances. Example with conversion to integer from value instance:

    $number = Env::Post('numberInput')->int;
    
  • If a single value that itself is an associative array, each keys is fetched from the environment group as a Core\Value instance and then the array value is applied as a key path to transform the value accordingly. This allows easy conversion from environmental values by a single array definition. Example:

    $request =
     Env::Request(array (
         'simpleString' => Value::String,
         'anInteger' => Value::Integer,
         'aStringObject' => Value::StringObject,
         'aStringInUppercase' => Value::UppercaseString,
         'convertedToArray' => 'toArray',
         )
     );
    

Returns

Core\Env_Field|Core\Value[]|mixed[]
Depends on keys array.

Since

3.1
public static string
# encodeKeyName( string $keyName )

Encodes a string for use as an environmental key.

Encodes a string for use as an environmental key.

Parameters

$keyName
String to encode as an environmental key.

Returns

string
Encoded string for use as an environmental key.

Since

3.1
public static boolean
# isCLI( )

Determines whether PHP is running in a command-line interface.

Determines whether PHP is running in a command-line interface.

Returns

boolean
true, if PHP runs in a command-line interface, otherwise false.

Since

3.1
public static boolean
# isHTTPS( )

Determines whether the script was queried through the HTTPS protocol.

Determines whether the script was queried through the HTTPS protocol.

Returns

boolean

true, if script was queried through the HTTPS protocol, otherwise false.

Since

3.1
public static Core\Env_FileList|Core\Env_File
# Files( string $key )

Returns the files interface for a given input name.

Returns the files interface for a given input name.

Parameters

$key
Name of file upload form field.

Returns

Core\Env_FileList|Core\Env_File

Single environment file or environment file array interface or null if no file has been uploaded using the given name.

Since

3.1

Methods inherited from Core\Object

__autocreateFactory(), __call(), __processParameters(), __toString(), attachMethod(), chain(), getValueForKey(), getValueForKeyPath(), getValueForUndefinedKey(), hash(), issetValueForKey(), setValueForKey(), setValueForKeyPath(), setValueForUndefinedKey(), uuid()

Magic methods summary

public static Core\Env_File
# File( $key )

File environment access.

File environment access.

Parameters

$key

Returns

Core\Env_File

Constants summary

Constants inherited from Core\Object

AnyParameterType, AutochainParameterType, AutocreateParameterType, BooleanParameterType, CharParameterType, EnumParameterType, IntegerParameterType, RealParameterType, StringParameterType, UserParameterType

Properties summary

Magic properties inherited from Core\Object

$hash, $uuid

xplo.re Medusa Core Framework 3.1 API documentation generated by ApiGen