Sons of PHP
Source Code
  • 🏠Home
  • Contributor Covenant Code of Conduct
  • Getting Help
  • Reporting Issues
  • Security Policy
  • 🪈Bard
    • Overview
    • Commands
  • Symfony Bundles
    • Feature Toggle
  • Contracts
    • Contracts Overview
    • Common
    • Cookie
    • CQRS
    • Filesystem
    • Mailer
    • Pager
    • Registry
    • State Machine
  • 📦Components
    • Assert
    • Cache
      • Adapters
      • Marshallers
    • Clock
    • Container
    • Cookie
    • CQRS
    • Event Dispatcher
    • Event Sourcing
      • Aggregates
        • Aggregate Repository
      • Event Messages
        • Using the Serializable Event Message
        • Message Enrichers
        • Message Serializers
        • Message Repository
        • Message Upcasters
    • Feature Toggle
    • Filesystem
      • Adapters
    • Http Factory
    • Http Handler
    • Http Message
    • JSON
    • Link
    • Logger
      • Handlers
      • Enrichers
      • Filters
      • Formatters
    • Mailer
      • Transports
    • Money
      • Currency Providers
      • Operators
      • Queries
    • Pager
      • Adapters
    • Registry
    • State Machine
    • Version
  • 💁Contributing
    • Contributing Overview
    • Contributing Code
    • Discussions
    • Documentation
Powered by GitBook
On this page
  • Marshallers
  • SerializableMarshaller
  • JsonMarshaller
  • Custom Marshaller

Was this helpful?

Edit on GitHub
  1. Components
  2. Cache

Marshallers

Marshallers

Using marshallers will allow you to serialize the cache values differently.

SerializableMarshaller

This marshaller will use php's native serialize and unserialize functions on the values.

<?php

use SonsOfPHP\Componenet\Cache\Marshaller\SerializableMarshaller;

$marshaller = new SerializableMarshaller();

JsonMarshaller

The json marshaller will use php's native json_encode and json_decode functions to serialize data.

<?php

use SonsOfPHP\Componenet\Cache\Marshaller\JsonMarshaller;

$marshaller = new JsonMarshaller();

Custom Marshaller

You can create a custom marshaller. For example, you could create one the encrypts/decrypts the values.

PreviousAdaptersNextClock

Last updated 8 months ago

Was this helpful?

📦