PluginProbe
User Access Manager / 2.1.9
User Access Manager v2.1.9
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.1.9, at src/File/FileObject.php

99 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 namespace UserAccessManager\File;
16
17 /**
18 * Class FileObject
19 * @package UserAccessManager\FileHandler
20 */
21 class FileObject
22 {
23 /**
24 * @var string
25 */
26 private $id;
27
28 /**
29 * @var string
30 */
31 private $type;
32
33 /**
34 * @var string
35 */
36 private $file;
37
38 /**
39 * @var bool
40 */
41 private $isImage;
42
43 /**
44 * FileObject constructor.
45 *
46 * @param string $id
47 * @param string $type
48 * @param string $file
49 * @param bool $isImage
50 */
51 public function __construct($id, $type, $file, $isImage = false)
52 {
53 $this->id = $id;
54 $this->type = $type;
55 $this->file = $file;
56 $this->isImage = $isImage;
57 }
58
59 /**
60 * Returns the file object id.
61 *
62 * @return string
63 */
64 public function getId()
65 {
66 return $this->id;
67 }
68
69 /**
70 * Returns the file object type.
71 *
72 * @return string
73 */
74 public function getType()
75 {
76 return $this->type;
77 }
78
79 /**
80 * Returns the file object file.
81 *
82 * @return string
83 */
84 public function getFile()
85 {
86 return $this->file;
87 }
88
89 /**
90 * Returns true if the file is a image.
91 *
92 * @return bool
93 */
94 public function isImage()
95 {
96 return $this->isImage;
97 }
98 }
99