RetailCRM API Client

FormEncoderBuilder
in package
implements BuilderInterface

Class FormEncoderBuilder

Tags
category

FormEncoderBuilder

SuppressWarnings

(PHPMD.CouplingBetweenObjects)

Table of Contents

Interfaces

BuilderInterface
Interface BuilderInterface

Methods

__construct()  : mixed
FormEncoderBuilder constructor.
build()  : mixed
Builds FormEncoder.
setCache()  : FormEncoderBuilder
Sets cache implementation.
setCacheDir()  : FormEncoderBuilder
Sets cache directory.
setSerializer()  : FormEncoderBuilder
Sets serializer implementation.

Methods

build()

Builds FormEncoder.

public build() : mixed

Note: Cache won't be set into provided serializer instance. It only works for instance built by this builder. You must manually inject the proper cache into the custom JMS Serializer instance.

Tags
inheritDoc

setCache()

Sets cache implementation.

public setCache(CacheItemPoolInterface $cache) : FormEncoderBuilder

This cache implementation will be used by FormEncoder component and underlying serializer to store annotations cache. Any cache from symfony/cache should work just fine.

Parameters
$cache : CacheItemPoolInterface
Return values
FormEncoderBuilder

setCacheDir()

Sets cache directory.

public setCacheDir(string $cacheDir) : FormEncoderBuilder

This directory will be used by FormEncoder component and underlying serializer to store annotations cache. Annotations parsing consumes a lot of resources, which is the reason why you should cache results.

Parameters
$cacheDir : string
Return values
FormEncoderBuilder

setSerializer()

Sets serializer implementation.

public setSerializer(SerializerInterface $serializer) : FormEncoderBuilder

This serializer implementation will be used by FormEncoder component.

Parameters
$serializer : SerializerInterface
Return values
FormEncoderBuilder

        
On this page

Search results