Esempio n. 1
0
 /**
  * Validate input has an extension and is in the whitelist.
  *
  * @uses Titon\Utility\Loader
  *
  * @param string $input
  * @param string|array $extensions
  * @return bool
  */
 public static function ext($input, $extensions = array('gif', 'jpeg', 'png', 'jpg'))
 {
     if (is_array($input) && isset($input['name'])) {
         $input = $input['name'];
     }
     return in_array(Path::ext($input), (array) $extensions, true);
 }
Esempio n. 2
0
 function ext($string)
 {
     return Path::ext($string);
 }