Skip to content

Commit 0b4bce9

Browse files
author
Fredrick Peter
committed
FileConfig function chaned to config_file
1 parent cd2911b commit 0b4bce9

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ $file = TameFile();
112112
| class | Assoc `array` | Create error and success class |
113113

114114
```config
115-
FileConfig(
115+
config_file(
116116
message: [
117117
'401' => 'Select file to upload',
118118
'402' => 'File upload is greater than allowed size of:',
@@ -147,6 +147,15 @@ FileConfig(
147147
);
148148
```
149149

150+
- or -- using file class method `Global Config`
151+
```
152+
(new File)->globalConfig(
153+
message: [],
154+
config: [],
155+
class: []
156+
);
157+
```
158+
150159
## Response Data
151160
- How to retrieve data
152161

src/helpers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function TameFile($name = null)
1818
}
1919

2020

21-
if (! function_exists('FileConfig')) {
21+
if (! function_exists('config_file')) {
2222
/**
2323
* Global Configuration
2424
*
@@ -28,7 +28,7 @@ function TameFile($name = null)
2828
*
2929
* @return void
3030
*/
31-
function FileConfig($message = [], $config = [], $class = [])
31+
function config_file($message = [], $config = [], $class = [])
3232
{
3333
(new File)->globalConfig($message, $config, $class);
3434
}

tests/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
// Configure the file uploader using global function helper
7-
FileConfig(
7+
config_file(
88
message: [
99
'401' => 'Select file to upload',
1010
'402' => 'File upload is greater than allowed size of:',

tests/index1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Env::loadOrFail();
1212

1313

14-
FileConfig(
14+
config_file(
1515
config: [
1616
'size' => '3mb'
1717
],

0 commit comments

Comments
 (0)