| 1 | <?php |
||
| 7 | class LeadFile extends Model |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var integer |
||
| 11 | */ |
||
| 12 | protected $id; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $name; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $ext; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | protected $data; |
||
| 28 | |||
| 29 | public function __construct(array $fileData = []) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return array |
||
| 47 | */ |
||
| 48 | public function toArray() |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return int |
||
| 68 | */ |
||
| 69 | public function getId() |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return string |
||
| 76 | */ |
||
| 77 | public function getName() |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return string |
||
| 84 | */ |
||
| 85 | public function getExt() |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @return string |
||
| 92 | */ |
||
| 93 | public function getData() |
||
| 97 | |||
| 98 | /** |
||
| 99 | * @param string $path (Full path to file with name and ext) |
||
| 100 | * |
||
| 101 | * @return void |
||
| 102 | */ |
||
| 103 | public function saveFile($path) |
||
| 112 | |||
| 113 | public function validate(){ |
||
| 116 | } |
||
| 117 |
If you suppress an error, we recommend checking for the error condition explicitly: