CommandLineOrUnsafeMethod example


class DefaultRequestPolicy extends ChainRequestPolicy {

  /** * Constructs the default page cache request policy. * * @param \Drupal\Core\Session\SessionConfigurationInterface $session_configuration * The session configuration. */
  public function __construct(SessionConfigurationInterface $session_configuration) {
    $this->addPolicy(new CommandLineOrUnsafeMethod());
    $this->addPolicy(new NoSessionOpen($session_configuration));
  }

}

class DefaultRequestPolicy extends ChainRequestPolicy {

  /** * Constructs the default Dynamic Page Cache request policy. */
  public function __construct() {
    $this->addPolicy(new CommandLineOrUnsafeMethod());
  }

}
Home | Imprint | This part of the site doesn't use cookies.