mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-08-20 05:13:42 -07:00
Made file and space existence validation optional
This commit is contained in:
parent
de7d7c7722
commit
aa5450538b
5 changed files with 44 additions and 35 deletions
|
@ -39,18 +39,15 @@ Rather obtain an instance from `\SpacesAPI\Space::list()`, `\SpacesAPI\Spaces::f
|
|||
**Description**
|
||||
|
||||
```php
|
||||
__construct (\SpacesAPI\Space $space, string $filename, array $info = [])
|
||||
__construct (\SpacesAPI\Space $space, string $filename, array $info = [], bool $validate = true)
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `(\SpacesAPI\Space) $space` : An instance of `\SpacesAPI\Space`
|
||||
* `(string) $filename` : The filename of a file
|
||||
* `(array) $info` : Any information already known about the file (eg content_length, content_type, etc). Default `[]`
|
||||
* `(bool) $validate` : Check that the file exists. Default `true`
|
||||
|
||||
**Return Values**
|
||||
|
||||
|
@ -58,7 +55,7 @@ Rather obtain an instance from `\SpacesAPI\Space::list()`, `\SpacesAPI\Spaces::f
|
|||
|
||||
**Throws Exceptions**
|
||||
|
||||
`\SpacesAPI\Exceptions\FileDoesntExistException` : If the file doesn't exist
|
||||
`\SpacesAPI\Exceptions\FileDoesntExistException` : If validation is `true` and the file doesn't exist
|
||||
|
||||
|
||||
<hr />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue