protected function _addTransformers(Model $model, Transit $transit, array $attachment) {
        if (empty($attachment['transforms'])) {
            return;
        }

        foreach ($attachment['transforms'] as $options) {
            $transformer = $this->_getTransformer($attachment, $options);

            if ($options['self']) {
                $transit->addSelfTransformer($transformer);
            } else {
                $transit->addTransformer($transformer);
            }
        }
    }
protected function _addTransformers(Model $model, Transit $transit, array $attachment) {
        if (empty($attachment['transforms'])) {
            return;
        }

        foreach ($attachment['transforms'] as $options) {
            $transformer = $this->_getTransformer($attachment, $options);

            if ($options['self']) {
                $transit->addSelfTransformer($transformer);
            } else {
                $transit->addTransformer($transformer);
            }
        }
    }
protected function _addTransformers ( Model $ model , Transit $ transit , array $ attachment ) { if ( empty ( $ attachment [ 'transforms' ] ) ) { return ; } foreach ( $ attachment [ 'transforms' ] as $ options ) { $ transformer = $ this -> _getTransformer ( $ attachment , $ options ) ; if ( $ options [ 'self' ] ) { $ transit -> addSelfTransformer ( $ transformer ) ; } else { $ transit -> addTransformer ( $ transformer ) ; } } }
Add Transit Transformers based on the attachment settings.

@param Model $model
@param \Transit\Transit $transit
@param array $attachment
Add Transit Transformers based on the attachment settings .