added methods for upload_of.
This commit is contained in:
parent
ee4dd5e987
commit
9f7da5cb39
|
@ -48,4 +48,27 @@ public function check($attribute, $attributes)
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the acceptable file extensions.
|
||||
*
|
||||
* @return Upload_Of
|
||||
*/
|
||||
public function has_extension()
|
||||
{
|
||||
$this->extensions = func_get_args();
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the maximum file size in bytes.
|
||||
*
|
||||
* @param int $maximum
|
||||
* @return Upload_Of
|
||||
*/
|
||||
public function less_than($maximum)
|
||||
{
|
||||
$this->maximum = $maximum;
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue