public function transformFileToFilePath($file)
    {
        //confirm we have a file
        $filePath = null;
        if (is_string($file)) {
            $filePath = $file;
        } elseif (is_object($file) && $file->is_a("File")) {
            $filePath = $file->Filename;
        }

        if (!$filePath) {
            throw new FileNotFoundException();
        }

        return $filePath;
    }
public function transformFileToFilePath($file)
    {
        //confirm we have a file
        $filePath = null;
        if (is_string($file)) {
            $filePath = $file;
        } elseif (is_object($file) && $file->is_a("File")) {
            $filePath = $file->Filename;
        }

        if (!$filePath) {
            throw new FileNotFoundException();
        }

        return $filePath;
    }
public function transformFileToFilePath ( $ file ) { //confirm we have a file $ filePath = null ; if ( is_string ( $ file ) ) { $ filePath = $ file ; } elseif ( is_object ( $ file ) && $ file -> is_a ( "File" ) ) { $ filePath = $ file -> Filename ; } if ( ! $ filePath ) { throw new FileNotFoundException ( ) ; } return $ filePath ; }
Gets a file path from either a File or a string

@param  string|File $file
@return string
@throws FileNotFoundException If an unexpected value was provided, or the filename was null
Gets a file path from either a File or a string