added methods for upload_of.

This commit is contained in:
Taylor Otwell 2011-06-26 09:04:40 -05:00
parent ee4dd5e987
commit 9f7da5cb39
1 changed files with 24 additions and 1 deletions

View File

@ -46,6 +46,29 @@ public function check($attribute, $attributes)
} }
return true; 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;
}
} }