Skip to content

Commit da822d7

Browse files
committed
Update README.md
1 parent 08f33df commit da822d7

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ new \Aautoloder\Loader(array(MBT_DOCUMENT_ROOT));
9898
Get per [Git](https://git-scm.com/) or [download](https://github.com/prod3v3loper/php-auto-autoloader/archive/master.zip) and use it.
9999

100100
```
101-
git clone https://github.com/prod3v3loper/php-auto-autoloader.git /Users/username/projects/
101+
git clone https://github.com/prod3v3loper/php-auto-autoloader.git /projects/
102102
```
103103

104104
So we use it without a vendor and can start a direct call.
@@ -192,11 +192,11 @@ define('MBT_HTTP_ROOT', get_protocol() . get_host() . MBT_SERVER_ROOT);
192192

193193
The autoloader finds everything yourself you do not have to do anything except write your class and instance and use.
194194

195-
Method | Namespace (Instance) | Path | Load Time
195+
Method | Namespace (with class) | Path | Load Time
196196
------------ | ------------ | ------------- | -------------
197-
1 | testclasses\classOne | php-auto-autoloader/testclasses/classOne.php | 0.0 sec.
198-
2 | testclasses\classes\classTwo.php | php-auto-autoloader/testclasses/classes/classTwo.php | 0.002 sec.
199-
3 | name_space\namespace2\three_class | php-auto-autoloader/testclasses/classThree.php | 0.011 sec.
197+
1 | testclasses\first_class | php-auto-autoloader/testclasses/first_class.php | 0.0 sec.
198+
2 | testclasses\classes\second_class | php-auto-autoloader/testclasses/classes/second.php | 0.002 sec.
199+
3 | name_space\namespace2\third_class | php-auto-autoloader/testclasses/classThree.php | 0.011 sec.
200200

201201
## METHOD 1:
202202

@@ -207,34 +207,34 @@ That means we take the website root path and namespace as a folder path and the
207207
### Example
208208

209209
**The instance:**
210-
`new testclasses\classOne();`
210+
`new testclasses\first_class();`
211211

212212
Type | Sample | Description
213213
---- | ------ | ------
214-
PATH | `/users/username/projects/sites/website/` | MBT_DOCUMENT_ROOT
214+
PATH | `/project/sites/mywebsite/` | MBT_DOCUMENT_ROOT
215215
NAMESPACE | `testclasses` | Like the folder name
216-
CLASS | `classOne` | Like the file name without extension
217-
Then the result example | `/users/username/projects/sites/website/testclasses/classOne.php` |
216+
CLASS | `first_class` | Like the file name without extension
217+
Then the result example | `/project/sites/mywebsite/testclasses/first_class.php` |
218218

219219
## METHOD 2:
220220

221221
> This method is slightly slower than the first, so 0.03 - 0.05 seconds
222222
223-
This function namespace as folder path and force only this path for class `class_two` (Example) file.
223+
This function namespace as folder path and force only this path for class `second_class` (Example) file.
224224
However, this only occurs when the file does not match the specified class name.
225225
This means every file found in this folder is opened and searched for the classname.
226226
As soon as the used class exists in a file, this is integrated and can use it.
227227

228228
### Example
229229

230230
**The instance:**
231-
`new testclasses\classes\class_two();`
231+
`new testclasses\classes\second_class();`
232232

233233
Type | Sample | Description
234234
---- | ------ | ------
235-
PATH | `/users/username/projects/sites/website/` | MBT_DOCUMENT_ROOT
235+
PATH | `/project/sites/website/` | MBT_DOCUMENT_ROOT
236236
NAMESPACE | `testclasses\classes` | Like the folder name
237-
Then the result example | `/users/username/projects/sites/website/testclasses/classes/classTwo.php` |
237+
Then the result example | `/project/sites/mywebsite/testclasses/classes/second_class.php` |
238238

239239
## METHOD 3:
240240

@@ -247,12 +247,12 @@ This method intervenes only when none of the other methods was successful. So if
247247
### Example
248248

249249
**The instance:**
250-
`new testclasses\classes\three_class();`
250+
`new testclasses\classes\third_class();`
251251

252252
Type | Sample | Description
253253
---- | ------ | ------
254-
PATH | `/users/username/projects/sites/website/` | MBT_DOCUMENT_ROOT
255-
Then the result example | `/users/username/projects/sites/website/testclasses/classThree.php` |
254+
PATH | `/project/sites/mywebsite/` | MBT_DOCUMENT_ROOT
255+
Then the result example | `/project/sites/mywebsite/testclasses/classThree.php` |
256256

257257
<div align="center">
258258

0 commit comments

Comments
 (0)