Contextual pipelines

It is often necessary to pass contextual arguments to the pipeline on top of the data returned by the pipeline. This is possible by using a table with at least 2 keys, named "args" and "data".

When the last function of the pipeline chain is called, only the value of data is returned.

$data = pipeline('nouveau_pipe',array(
	'args'=>array(
		'id_article'=>$id_article
	), 
	'data'=>"contenu au demarrage"
));
[(#PIPELINE{nouveau_pipe,
	[(#ARRAY{
		args,[(#ARRAY{id_article,#ID_ARTICLE})],
		data,contenu au demarrage
	})]})]

Author Gilles Vincent Published : Updated : 12/03/23

Translations : English, français