Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / file_mdm / src / FileMetadataManagerInterface.php
1 <?php
2
3 namespace Drupal\file_mdm;
4
5 /**
6  * Provides an interface for file metadata manager objects.
7  */
8 interface FileMetadataManagerInterface {
9
10   /**
11    * Determines if the URI is currently in use by the manager.
12    *
13    * @param string $uri
14    *   The URI to a file.
15    *
16    * @return bool
17    *   TRUE if the URI is in use, FALSE otherwise.
18    */
19   public function has($uri);
20
21   /**
22    * Returns a FileMetadata object for the URI, creating it if necessary.
23    *
24    * @param string $uri
25    *   The URI to a file.
26    *
27    * @return \Drupal\file_mdm\FileMetadataInterface|null
28    *   The FileMetadata object for the specified URI.
29    */
30   public function uri($uri);
31
32   /**
33    * Deletes the all the cached metadata for the URI.
34    *
35    * @param string $uri
36    *   The URI to a file.
37    *
38    * @return bool
39    *   TRUE if the cached metadata was removed, FALSE in case of error.
40    */
41   public function deleteCachedMetadata($uri);
42
43   /**
44    * Releases the FileMetadata object for the URI.
45    *
46    * @param string $uri
47    *   The URI to a file.
48    *
49    * @return bool
50    *   TRUE if the FileMetadata for the URI was removed from the manager,
51    *   FALSE otherwise.
52    */
53   public function release($uri);
54
55   /**
56    * Returns the count of FileMetadata objects currently in use.
57    *
58    * @return int
59    *   The number of FileMetadata objects currently in use.
60    */
61   public function count();
62
63 }