mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-08-12 00:04:11 +02:00
Start using PSR-4
This commit is contained in:
@@ -88,9 +88,9 @@ require 'vendor/autoload.php';
|
|||||||
Otherwise, you can simply require the file directly:
|
Otherwise, you can simply require the file directly:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
require_once 'path/to/Stringy/src/Stringy/Stringy.php';
|
require_once 'path/to/Stringy/src/Stringy.php';
|
||||||
// or
|
// or
|
||||||
require_once 'path/to/Stringy/src/Stringy/StaticStringy.php';
|
require_once 'path/to/Stringy/src/StaticStringy.php';
|
||||||
```
|
```
|
||||||
|
|
||||||
And in either case, I'd suggest using an alias.
|
And in either case, I'd suggest using an alias.
|
||||||
|
@@ -17,7 +17,11 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0"
|
"php": ">=5.3.0"
|
||||||
},
|
},
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/danielstjules/Stringy/issues",
|
||||||
|
"source": "https://github.com/danielstjules/Stringy"
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": { "Stringy": "src/" }
|
"psr-4": { "Stringy\\": "src/" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
syntaxCheck="false">
|
syntaxCheck="false">
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Stringy">
|
<testsuite name="Stringy">
|
||||||
<directory>tests/Stringy</directory>
|
<directory>tests</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$base = realpath(dirname(__FILE__) . '/../..');
|
$base = realpath(dirname(__FILE__) . '/..');
|
||||||
require("$base/src/Stringy/StaticStringy.php");
|
require("$base/src/StaticStringy.php");
|
||||||
|
|
||||||
use Stringy\StaticStringy as S;
|
use Stringy\StaticStringy as S;
|
||||||
|
|
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$base = realpath(dirname(__FILE__) . '/../..');
|
$base = realpath(dirname(__FILE__) . '/..');
|
||||||
require("$base/src/Stringy/Stringy.php");
|
require("$base/src/Stringy.php");
|
||||||
|
|
||||||
use Stringy\Stringy as S;
|
use Stringy\Stringy as S;
|
||||||
|
|
Reference in New Issue
Block a user