Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 3a78a3b

Browse files
committed
update lib namespace, update lib package name
1 parent 3e0e24a commit 3a78a3b

File tree

9 files changed

+22
-22
lines changed

9 files changed

+22
-22
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## install
44

55
```bash
6-
composer require mylib/php-utils
6+
composer require toolkit/php-utils
77
```
88

99
## license

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "mylib/php-utils",
2+
"name": "toolkit/php-utils",
33
"type": "library",
44
"description": "some php tool library of the php",
55
"keywords": ["library","tool","php"],
6-
"homepage": "https://github.com/php-mylib/php-utils",
6+
"homepage": "https://github.com/php-toolkit/php-utils",
77
"license": "MIT",
88
"authors": [
99
{
@@ -17,7 +17,7 @@
1717
},
1818
"autoload": {
1919
"psr-4": {
20-
"MyLib\\PhpUtil\\" : "src/"
20+
"Toolkit\\PhpUtil\\" : "src/"
2121
}
2222
},
2323
"suggest": {

src/AutoLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* 参考并提取自 composer, 简单的文件 class 加载器
88
*/
99

10-
namespace MyLib\PhpUtil;
10+
namespace Toolkit\PhpUtil;
1111

1212
/**
1313
* Class AutoLoader
14-
* @package MyLib\PhpUtil
14+
* @package Toolkit\PhpUtil
1515
* ```php
1616
* AutoLoader::addFiles([
1717
* // file

src/Php.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* Time: 上午12:09
77
*/
88

9-
namespace MyLib\PhpUtil;
9+
namespace Toolkit\PhpUtil;
1010

1111
/**
1212
* Class Php - alias of the class PhpHelper
13-
* @package MyLib\PhpUtil
13+
* @package Toolkit\PhpUtil
1414
*/
1515
class Php extends PhpHelper
1616
{

src/PhpEnv.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* Time: 19:20
77
*/
88

9-
namespace MyLib\PhpUtil;
9+
namespace Toolkit\PhpUtil;
1010

1111
/**
1212
* Class PhpEnv
13-
* @package MyLib\PhpUtil
13+
* @package Toolkit\PhpUtil
1414
*/
1515
final class PhpEnv
1616
{

src/PhpError.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* Time: 上午10:04
77
*/
88

9-
namespace MyLib\PhpUtil;
9+
namespace Toolkit\PhpUtil;
1010

1111
/**
1212
* Class PhpError
13-
* @package MyLib\PhpUtil
13+
* @package Toolkit\PhpUtil
1414
*/
1515
class PhpError
1616
{

src/PhpException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* Time: 下午11:15
77
*/
88

9-
namespace MyLib\PhpUtil;
9+
namespace Toolkit\PhpUtil;
1010

1111
/**
1212
* Class PhpException
13-
* @package MyLib\PhpUtil
13+
* @package Toolkit\PhpUtil
1414
*/
1515
class PhpException
1616
{

src/PhpHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
*
44
*/
55

6-
namespace MyLib\PhpUtil;
6+
namespace Toolkit\PhpUtil;
77

88
use Inhere\Exceptions\ExtensionMissException;
99

1010
/**
1111
* Class PhpHelper
12-
* @package MyLib\PhpUtil
12+
* @package Toolkit\PhpUtil
1313
*/
1414
class PhpHelper
1515
{

test/boot.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
spl_autoload_register(function ($class) {
1111
$file = null;
1212

13-
if (0 === strpos($class,'MyLib\PhpUtil\Example\\')) {
14-
$path = str_replace('\\', '/', substr($class, strlen('MyLib\PhpUtil\Example\\')));
13+
if (0 === strpos($class,'Toolkit\PhpUtil\Example\\')) {
14+
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\PhpUtil\Example\\')));
1515
$file = dirname(__DIR__) . "/example/{$path}.php";
16-
} elseif (0 === strpos($class,'MyLib\PhpUtil\Test\\')) {
17-
$path = str_replace('\\', '/', substr($class, strlen('MyLib\PhpUtil\Test\\')));
16+
} elseif (0 === strpos($class,'Toolkit\PhpUtil\Test\\')) {
17+
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\PhpUtil\Test\\')));
1818
$file = __DIR__ . "/{$path}.php";
19-
} elseif (0 === strpos($class,'MyLib\PhpUtil\\')) {
20-
$path = str_replace('\\', '/', substr($class, strlen('MyLib\PhpUtil\\')));
19+
} elseif (0 === strpos($class,'Toolkit\PhpUtil\\')) {
20+
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\PhpUtil\\')));
2121
$file = dirname(__DIR__) . "/src/{$path}.php";
2222
}
2323

0 commit comments

Comments
 (0)