drupal/cacheable_types

Maintainers

Package info

git.drupalcode.org/project/cacheable_types.git

pkg:composer/drupal/cacheable_types

Statistics

Installs: 945

Dependents: 3

Suggesters: 0

1.0.4 2023-08-02 22:49 UTC

This package is auto-updated.

Last update: 2026-03-09 00:28:43 UTC


README

Immutable classes and builders that make doing it wrong harder.

CacheableBool

# Never forget cacheability.
CacheableBool::create($bool, $cacheability)
$cacheableBool->value()
assert($cacheableBool instanceof CacheableDependencyInterface)
CacheableBool::ifAccessResultAllowed($accessResult)
CacheableBool::ifAccessResultNotForbidden($accessResult)
$cacheableBool->toAllowedOrNeutral()
$cacheableBool->toNeutralOrForbidden()
$cacheableBool->toAllowedOrForbidden()
CacheableBool::not()
CacheableBool::and(...$cacheableBoolItems)
CacheableBool::or(...$cacheableBoolItems)