26 lines
570 B
PHP
26 lines
570 B
PHP
<?php
|
|
|
|
namespace KupShop\KupShopBundle\Context;
|
|
|
|
interface ContextInterface
|
|
{
|
|
public function activate(string $id);
|
|
|
|
public function getActiveId();
|
|
|
|
public function getActive();
|
|
|
|
public function getSupported();
|
|
|
|
/**
|
|
* Removes the currently loaded contextual object / entity.
|
|
*/
|
|
public function clearCache(): void;
|
|
|
|
/**
|
|
* @return bool true when the supplied <b>$id</b> can be activated (is a valid ID of a contextual object / entity),
|
|
* false otherwise
|
|
*/
|
|
public function isValid(string $id): bool;
|
|
}
|