protected function cleanSerial($serial)
    {
        if ($serial instanceof \core_kernel_classes_Resource) {
            $serial = $serial->getUri();
        } elseif ($serial instanceof \core_kernel_classes_Literal) {
            $serial = $serial->__toString();
        } elseif (!is_string($serial)) {
            throw new FileSerializerException('Unsupported serial "'.gettype($serial).'" in '.__CLASS__);
        }

        return $serial;
    }
protected function cleanSerial($serial)
    {
        if ($serial instanceof \core_kernel_classes_Resource) {
            $serial = $serial->getUri();
        } elseif ($serial instanceof \core_kernel_classes_Literal) {
            $serial = $serial->__toString();
        } elseif (!is_string($serial)) {
            throw new FileSerializerException('Unsupported serial "'.gettype($serial).'" in '.__CLASS__);
        }

        return $serial;
    }
protected function cleanSerial ( $ serial ) { if ( $ serial instanceof \ core_kernel_classes_Resource ) { $ serial = $ serial -> getUri ( ) ; } elseif ( $ serial instanceof \ core_kernel_classes_Literal ) { $ serial = $ serial -> __toString ( ) ; } elseif ( ! is_string ( $ serial ) ) { throw new FileSerializerException ( 'Unsupported serial "' . gettype ( $ serial ) . '" in ' . __CLASS__ ) ; } return $ serial ; }
Ensure serial is a string

@param string $serial
@throws FileSerializerException
@return string
Ensure serial is a string