class TransformService extends BaseService

Transform pipeline master service.

Pipelines are a series of callbacks used to modify content before storage: $transform = new \Ceo\Services\TransformService; $transform->registerPipeline('content', [ function($article) { $article->content .= "\n\n";

          return $article
      }
  ]);
  ...
  $pipeline = $transform->pipelineFor('content');
  $pipeline->transform($inputData);

Properties

protected $pipelines

Methods

Pipeline
pipelineFor(string $type)

Retrieve a pipline for a given type

Pipeline
registerPipeline(string $type, array $actions = [])

Register or re-register a pipeline

Details

at line 34
Pipeline pipelineFor(string $type)

Retrieve a pipline for a given type

Parameters

string $type

Return Value

Pipeline

at line 48
Pipeline registerPipeline(string $type, array $actions = [])

Register or re-register a pipeline

Parameters

string $type
array $actions Array of closures

Return Value

Pipeline