You are here

CookieInterface.php in Bakery Single Sign-On System 8.2

File

src/Cookies/CookieInterface.php
View source
<?php

namespace Drupal\bakery\Cookies;

interface CookieInterface {

  /**
   * Create from data stored in a cookie.
   *
   * @param array $data
   *   The data stored in the cookie.
   *
   * @return static
   */
  public static function fromData(array $data);

  /**
   * Convert the data into an array to be stored into a cookie.
   *
   * @return array
   *   The data to store in the cookie.
   */
  public function toData() : array;

  /**
   * Get the cookie name/type.
   *
   * @return string
   */
  public static function getName() : string;

}

Interfaces

Namesort descending Description
CookieInterface