private function transformer($transformer)
    {
        if (is_string($transformer) && class_exists($transformer)) {
            $transformer = new $transformer();
        }
        if (is_object($transformer) && method_exists($transformer, 'transform')) {
            $transformer = [$transformer, 'transform'];
        }

        return is_callable($transformer) ? $transformer : false;
    }
private function transformer($transformer)
    {
        if (is_string($transformer) && class_exists($transformer)) {
            $transformer = new $transformer();
        }
        if (is_object($transformer) && method_exists($transformer, 'transform')) {
            $transformer = [$transformer, 'transform'];
        }

        return is_callable($transformer) ? $transformer : false;
    }
private function transformer ( $ transformer ) { if ( is_string ( $ transformer ) && class_exists ( $ transformer ) ) { $ transformer = new $ transformer ( ) ; } if ( is_object ( $ transformer ) && method_exists ( $ transformer , 'transform' ) ) { $ transformer = [ $ transformer , 'transform' ] ; } return is_callable ( $ transformer ) ? $ transformer : false ; }
Return a transformer callback from a settings

@param  mixed         $transformer
@return callable|bool
Return a transformer callback from a settings