Example #1
0
 private function _loadFileModels()
 {
     if (!empty($this->filePaths)) {
         foreach ($this->filePaths as $filePath) {
             $file = File::loadPath($filePath);
             if ($file) {
                 if ($this->fileTypes !== null) {
                     if (in_array($file->getType(), $this->fileTypes)) {
                         $this->files[] = $file;
                     }
                 } else {
                     $this->files[] = $file;
                 }
             }
         }
     }
 }