You are here

class AuthcacheP13nConfOverrideContextProvider in Authenticated User Page Caching (Authcache) 7.2

Interface for context providers.

Hierarchy

Expanded class hierarchy of AuthcacheP13nConfOverrideContextProvider

2 string references to 'AuthcacheP13nConfOverrideContextProvider'
AuthcacheP13nTestRequestBuilder::testRequestResourcesNullFragments in modules/authcache_p13n/tests/authcache_p13n.request-builder.test
Cover authcache_p13n_request_resources().
authcache_p13n_authcache_p13n_base_request in modules/authcache_p13n/authcache_p13n.module
Implements hook_authcache_p13n_base_request().

File

modules/authcache_p13n/includes/AuthcacheP13nConfOverrideContextProvider.inc, line 11
Defines context provider for overriding conf values.

View source
class AuthcacheP13nConfOverrideContextProvider implements AuthcacheP13nContextProviderInterface {

  /**
   * ConfOverride phase required to serve this request.
   */
  protected $overrideConf;

  /**
   * Construct new instance.
   */
  public function __construct(array $override_conf = array()) {
    $this->overrideConf = $override_conf;
  }

  /**
   * {@inheritdoc}
   */
  public function get($input) {
    global $conf;
    $original = array_intersect_key($conf, $this->overrideConf);
    $conf = $this->overrideConf + $conf;
    return $original;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AuthcacheP13nConfOverrideContextProvider::$overrideConf protected property ConfOverride phase required to serve this request.
AuthcacheP13nConfOverrideContextProvider::get public function Build and return context for the current request. Overrides AuthcacheP13nContextProviderInterface::get
AuthcacheP13nConfOverrideContextProvider::__construct public function Construct new instance.