public function getFiles($options = array())
{
$options = array_merge($this->options, $options);
$folder = $options['file_base_path'] . '/' . $options['folder'];
if (file_exists($folder)) {
$dirs = glob("{$folder}/originals/*");
$fullPath = isset($options['full_path']) ? $options['full_path'] : false;
if ($fullPath) {
return $dirs;
}
if (!is_array($dirs)) {
$dirs = array();
}
$result = array_map(function ($s) {
return preg_replace('|^.+[\\/]|', '', $s);
}, $dirs);
return $result;
} else {
return array();
}
}