/** * Create a new protected file from an existing file * @param string $path Path to file * @return ProtectedFile */ public static function createFromFile($path) { $file = new ProtectedFile(); $file->setSource($path); return $file; }