BackupGuard
5 years ago
Dropbox
5 years ago
Request
5 years ago
SGArchive.php
5 years ago
SGAuthClient.php
5 years ago
SGCallback.php
5 years ago
SGCdrEntry.php
5 years ago
SGCharsetHandler.php
5 years ago
SGDBState.php
5 years ago
SGEntry.php
5 years ago
SGFileEntry.php
5 years ago
SGFileState.php
5 years ago
SGMigrateState.php
5 years ago
SGMysqldump.php
5 years ago
SGReloadHandler.php
5 years ago
SGReloader.php
5 years ago
SGReloaderState.php
5 years ago
SGReviewManager.php
5 years ago
SGState.php
5 years ago
SGStatsRequests.php
5 years ago
SGUploadHandler.php
5 years ago
SGUploadState.php
5 years ago
SGFileEntry.php
67 lines
| 1 | <?php |
| 2 | |
| 3 | require_once(dirname(__FILE__).'/SGEntry.php'); |
| 4 | |
| 5 | /** |
| 6 | * |
| 7 | */ |
| 8 | class SGFileEntry implements SGEntry |
| 9 | { |
| 10 | private $name; |
| 11 | private $type; |
| 12 | private $path; |
| 13 | private $dateModified; |
| 14 | |
| 15 | public function __construct() |
| 16 | { |
| 17 | $this->type = SG_ENTRY_TYPE_FILE; |
| 18 | } |
| 19 | |
| 20 | public function getName() |
| 21 | { |
| 22 | return $this->name; |
| 23 | } |
| 24 | |
| 25 | public function getPath() |
| 26 | { |
| 27 | return $this->path; |
| 28 | } |
| 29 | |
| 30 | public function getType() |
| 31 | { |
| 32 | return $this->type; |
| 33 | } |
| 34 | |
| 35 | public function setName($name) |
| 36 | { |
| 37 | $this->name = $name; |
| 38 | } |
| 39 | |
| 40 | public function setPath($path) |
| 41 | { |
| 42 | $this->path = $path; |
| 43 | } |
| 44 | |
| 45 | public function setDateModified($date) |
| 46 | { |
| 47 | $this->dateModified = $date; |
| 48 | } |
| 49 | |
| 50 | public function getDateModified() |
| 51 | { |
| 52 | return $this->dateModified; |
| 53 | } |
| 54 | |
| 55 | public function toArray() |
| 56 | { |
| 57 | $fileEntry = array( |
| 58 | 'name' => $this->getName(), |
| 59 | 'path' => $this->getPath(), |
| 60 | 'type' => $this->getType(), |
| 61 | 'date_modified' => $this->getDateModified() |
| 62 | ); |
| 63 | |
| 64 | return $fileEntry; |
| 65 | } |
| 66 | } |
| 67 |