added methods for upload_of.

This commit is contained in:
Taylor Otwell
2011-06-26 09:04:40 -05:00
parent ee4dd5e987
commit 9f7da5cb39

View File

@@ -46,6 +46,29 @@ class Upload_Of extends Rule {
}
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;
}
}