PluginProbe
User Access Manager / 2.2.22
User Access Manager v2.2.22
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
user-access-manager / src / File / FileObject.php

FileObject.php in User Access Manager 2.2.22, at src/File/FileObject.php

97 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * FileObject.php
4 *
5 * The FileObject class file.
6 *
7 * PHP versions 5
8 *
9 * @author Alexander Schneider <alexanderschneider85@gmail.com>
10 * @copyright 2008-2017 Alexander Schneider
11 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
12 * @version SVN: $id$
13 * @link http://wordpress.org/extend/plugins/user-access-manager/
14 */
15
16 declare(strict_types=1);
17
18 namespace UserAccessManager\File;
19
20 /**
21 * Class FileObject
22 * @package UserAccessManager\FileHandler
23 */
24 class FileObject
25 {
26 /**
27 * @var string
28 */
29 private $id;
30
31 /**
32 * @var string
33 */
34 private $type;
35
36 /**
37 * @var string
38 */
39 private $file;
40
41 /**
42 * @var bool
43 */
44 private $isImage;
45
46 /**
47 * FileObject constructor.
48 * @param string $id
49 * @param string $type
50 * @param string $file
51 * @param bool $isImage
52 */
53 public function __construct(string $id, string $type, string $file, $isImage = false)
54 {
55 $this->id = $id;
56 $this->type = $type;
57 $this->file = $file;
58 $this->isImage = $isImage;
59 }
60
61 /**
62 * Returns the file object id.
63 * @return string|int
64 */
65 public function getId()
66 {
67 return $this->id;
68 }
69
70 /**
71 * Returns the file object type.
72 * @return string
73 */
74 public function getType(): string
75 {
76 return $this->type;
77 }
78
79 /**
80 * Returns the file object file.
81 * @return string
82 */
83 public function getFile(): string
84 {
85 return $this->file;
86 }
87
88 /**
89 * Returns true if the file is a image.
90 * @return bool
91 */
92 public function isImage(): bool
93 {
94 return $this->isImage;
95 }
96 }
97