public function transform($value): ?string
    {
        if (null === $value) {
            return null;
        }

        if (!is_array($value) || array_diff(['id', 'module', 'function'], array_keys($value))) {
            throw new TransformationFailedException('Expected a valid array of data.');
        }

        return implode(':', [$value['id'], $value['module'], $value['function']]);
    }
public function transform($value): ?string
    {
        if (null === $value) {
            return null;
        }

        if (!is_array($value) || array_diff(['id', 'module', 'function'], array_keys($value))) {
            throw new TransformationFailedException('Expected a valid array of data.');
        }

        return implode(':', [$value['id'], $value['module'], $value['function']]);
    }
public function transform ( $ value ) : ? string { if ( null === $ value ) { return null ; } if ( ! is_array ( $ value ) || array_diff ( [ 'id' , 'module' , 'function' ] , array_keys ( $ value ) ) ) { throw new TransformationFailedException ( 'Expected a valid array of data.' ) ; } return implode ( ':' , [ $ value [ 'id' ] , $ value [ 'module' ] , $ value [ 'function' ] ] ) ; }
Transforms a domain specific Policy object into a Policy string.

@param mixed $value

@return string|null

@throws TransformationFailedException
Transforms a domain specific Policy object into a Policy string .