Oroboros Core
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Namespaces

  • None
  • oroboros
    • core
      • abstracts
        • adapters
        • bootstrap
        • controllers
        • libraries
          • auth
          • bootstrap
          • cache
          • codex
          • config
          • container
          • data
          • database
          • dns
          • entity
          • enum
          • error
          • event
          • extension
          • file
          • flags
          • hooks
          • job
          • logger
          • manager
          • message
          • prototype
          • request
          • response
          • routine
          • shell
          • startup
          • stream
          • template
          • uri
          • utility
          • validation
            • workers
          • worker
        • models
        • patterns
          • behavioral
          • creational
        • utilities
          • exception
            • cache
            • container
          • http
        • views
      • interfaces
        • adapters
          • interpreters
          • sdk
        • api
          • adapters
          • bootstrap
          • controllers
          • psr
        • contract
          • adapters
          • bootstrap
          • codex
          • components
          • controllers
          • data
          • entities
          • errors
          • events
          • extensions
          • jobs
          • libraries
            • auth
            • cache
            • config
            • container
            • enum
            • file
            • flags
            • hooks
            • module
            • promise
            • record
            • request
            • response
            • server
            • shutdown
            • site
            • stream
            • template
            • theme
            • uri
          • models
          • patterns
            • behavioral
            • concurrency
            • creational
            • structural
          • routes
          • routines
            • bootload
            • declarative
            • procedural
            • subsystem
          • services
            • consumer
              • cgi
              • rest
                • local
                • remote
                  • authenticated
                  • unauthenticated
            • provider
              • cgi
              • rest
                • local
                • remote
                  • authenticated
                  • unauthenticated
          • utilities
            • datetime
            • exception
              • cache
              • container
            • filebase
            • http
            • math
            • parser
            • regex
            • session
          • views
        • enumerated
          • environment
          • flags
          • http
          • views
        • libraries
          • manager
          • worker
      • libraries
        • api
        • codex
        • container
        • enum
          • http
        • file
        • hooks
        • logger
        • math
        • psr4
        • request
        • response
        • stream
        • uri
      • patterns
        • creational
      • traits
        • adapters
        • bootstrap
        • codex
        • components
        • controllers
        • data
        • entities
        • events
        • extensions
        • jobs
        • libraries
          • container
          • file
          • request
          • response
          • stream
          • uri
        • models
        • modules
        • patterns
          • behavioral
          • concurrency
          • creational
          • structural
        • routes
        • services
        • utilities
          • core
            • api
            • config
            • contract
              • contract
            • enum
            • environment
            • routines
          • datetime
          • error
          • exception
          • filebase
          • hooks
          • html
          • http
          • logic
          • math
          • parsers
          • regex
          • session
        • views
      • utilities
        • exception
          • cache
          • container
        • http
      • views
    • tests
      • patterns
        • creational
      • psr
        • psr7
      • utilities
        • exception
  • PasswordCompat
    • binary
  • PHP

Interfaces

  • BaseEnvironmentApi
  • BuildEnvironmentApi
  • CgiEnvironmentApi
  • ClientEnvironmentApi
  • CoreEnvironmentApi
  • EnvironmentApi
  • HttpEnvironmentApi
  • ProjectEnvironmentApi
  • ServerEnvironmentApi

Interface HttpEnvironmentApi

This enumerated api interface defines the http runtime environment.

Enumerated Api Interfaces Enumerated Api Interfaces provide sets of fixed, enumerated values that must maintain consistency, and should not be overridden at compile time.

In some cases, these values are considered absolute, and the program will always reference them as defined. In other cases, they provide baseline definitions, which the individual api implementing them may allow for extension upon. In these cases, the fixed values MAY NOT be removed or altered, but additions and aliases will be allowed for. Check the api of the individual contract being considered for extension for information

how to accomplish this as it applies.

oroboros\core\interfaces\enumerated\environment\HttpEnvironmentApi implements oroboros\core\interfaces\enumerated\BaseEnumerated

Direct known implementers

oroboros\core\interfaces\enumerated\environment\EnvironmentApi

Namespace: oroboros\core\interfaces\enumerated\environment
Package: oroboros\core\environment
Category: enumerated-interfaces
License: The MIT License (MIT)
Author: Brian Dayhoff mopsyd@me.com
Version: 0.2.4-alpha
Since: 0.2.4-alpha
Link: bitbucket.org/oroborosframework/oroboros-core/wiki/development/api/enumerated_api_interface.md
Located at core/interfaces/enumerated/environment/HttpEnvironmentApi.php

Constants summary

IS_HTTP

Defines if the current request is http based. This value cannot be overridden. Doing so will cause the system to reference cli resources that are not available, and cause errors during http sessions.

Defines if the current request is http based. This value cannot be overridden. Doing so will cause the system to reference cli resources that are not available, and cause errors during http sessions.

# OROBOROS_IS_HTTP
IS_SSL

Defines if the current request is SSL. This value may be overridden. define('OROBOROS_IS_SSL', true); // or false

Defines if the current request is SSL. This value may be overridden. define('OROBOROS_IS_SSL', true); // or false

Unless overridden, this value will always be false if cli, and otherwise will detect ssl using the webservers global declaration.

# OROBOROS_IS_SSL
IS_AJAX

Defines if the current request is an AJAX call. This value may be overridden. define('OROBOROS_IS_AJAX', true); //or false

Defines if the current request is an AJAX call. This value may be overridden. define('OROBOROS_IS_AJAX', true); //or false

Unless overridden, this value will always be false if cli, and otherwise will check for the presence of: HTTP_X_REQUESTED_WITH = xmlhttprequest;

This is standardly passed in a header with an ajax call. If your ajax calls are not firing correctly, make sure this header is present on request.

# OROBOROS_IS_AJAX
REQUEST_URL

Defines the current host url. This value may be overridden. define('OROBOROS_URL', 'http://example.com');

Defines the current host url. This value may be overridden. define('OROBOROS_URL', 'http://example.com');

Unless overridden, this value will always be false if cli, and otherwise will append the correct http/https prefix to HTTP_HOST, and strip any trailing slashes from the resulting value.

# OROBOROS_URL
REQUEST_URI

Defines the current request uri. This value can be overridden. define('OROBOROS_PAGE', 'http://example.com/some-page/');

Defines the current request uri. This value can be overridden. define('OROBOROS_PAGE', 'http://example.com/some-page/');

Unless overridden, this value will always be false if cli, and otherwise will create the fully qualified request uri with the correct ssl prefix, and a trailing slash at the end.

# OROBOROS_PAGE
REQUEST_METHOD

Defines the current request method. This value can be overridden.

Defines the current request method. This value can be overridden.

//Valid values: [cli, get, head, post, put, delete, options, trace, connect, patch] //It is generally adviseable to not use trace. Others may be used at your discretion. //All values other than cli are defined based on the w3c spec //@see https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html define('OROBOROS_REQUEST_METHOD', 'get');

Unless overridden, this value will always be 'cli' if cli, and otherwise will use the http request type.

# OROBOROS_REQUEST_METHOD
Oroboros Core API documentation generated by ApiGen