Skip to content
This repository was archived by the owner on Jun 11, 2020. It is now read-only.

Commit accd40b

Browse files
committed
update namespace
1 parent 5e2c0a9 commit accd40b

13 files changed

+33
-33
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"autoload": {
1919
"psr-4": {
20-
"MyLib\\Obj\\" : "src/"
20+
"MyLib\\ObjUtil\\" : "src/"
2121
}
2222
},
2323
"suggest": {

src/Exception/GetPropertyException.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* Time: 23:25
77
*/
88

9-
namespace MyLib\Obj\Exception;
9+
namespace MyLib\ObjUtil\Exception;
1010

1111
/**
1212
* Class GetPropertyException
13-
* @package MyLib\Obj\Exception
13+
* @package MyLib\ObjUtil\Exception
1414
*/
1515
class GetPropertyException extends \RuntimeException
1616
{

src/Exception/PropertyException.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* Time: 23:25
77
*/
88

9-
namespace MyLib\Obj\Exception;
9+
namespace MyLib\ObjUtil\Exception;
1010

1111
/**
1212
* Class PropertyException
13-
* @package MyLib\Obj\Exception
13+
* @package MyLib\ObjUtil\Exception
1414
*/
1515
class PropertyException extends \RuntimeException
1616
{

src/Exception/SetPropertyException.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* Time: 23:25
77
*/
88

9-
namespace MyLib\Obj\Exception;
9+
namespace MyLib\ObjUtil\Exception;
1010

1111
/**
1212
* Class SetPropertyException
13-
* @package MyLib\Obj\Exception
13+
* @package MyLib\ObjUtil\Exception
1414
*/
1515
class SetPropertyException extends \RuntimeException
1616
{

src/Obj.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
* Time: 下午9:39
77
*/
88

9-
namespace MyLib\Obj;
9+
namespace MyLib\ObjUtil;
1010

11-
use MyLib\Obj\Traits\ObjectPoolTrait;
11+
use MyLib\ObjUtil\Traits\ObjectPoolTrait;
1212

1313
/**
1414
* Class Obj
1515
* alias of the ObjectHelper
16-
* @package MyLib\Obj
16+
* @package MyLib\ObjUtil
1717
*/
1818
class Obj extends ObjectHelper
1919
{

src/ObjectHelper.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
* Uesd: 主要功能是 hi
88
*/
99

10-
namespace MyLib\Obj;
10+
namespace MyLib\ObjUtil;
1111

1212
use Inhere\Exceptions\DependencyResolutionException;
1313

1414
/**
1515
* Class ObjectHelper
16-
* @package MyLib\Obj
16+
* @package MyLib\ObjUtil
1717
*/
1818
class ObjectHelper
1919
{

src/Traits/ArrayAccessByGetterSetterTrait.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* Time: 22:03
77
*/
88

9-
namespace MyLib\Obj\Traits;
9+
namespace MyLib\ObjUtil\Traits;
1010

1111
/**
1212
* Class TraitArrayAccess
13-
* @package MyLib\Obj\Traits
13+
* @package MyLib\ObjUtil\Traits
1414
* ```
1515
* class A implements \ArrayAccess
1616
* {

src/Traits/ArrayAccessByPropertyTrait.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* Time: 22:03
77
*/
88

9-
namespace MyLib\Obj\Traits;
9+
namespace MyLib\ObjUtil\Traits;
1010

1111
/**
1212
* Class TraitArrayAccess
13-
* @package MyLib\Obj\Traits
13+
* @package MyLib\ObjUtil\Traits
1414
* ```
1515
* class A implements \ArrayAccess
1616
* {

src/Traits/ObjectPoolTrait.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
* Time: 17:02
77
*/
88

9-
namespace MyLib\Obj\Traits;
9+
namespace MyLib\ObjUtil\Traits;
1010

1111
/**
1212
* Class ObjectPoolTrait
13-
* @package MyLib\Obj\Traits
13+
* @package MyLib\ObjUtil\Traits
1414
*/
1515
trait ObjectPoolTrait
1616
{

src/Traits/PropertyAccessByGetterSetterTrait.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
* Time: 22:03
77
*/
88

9-
namespace MyLib\Obj\Traits;
9+
namespace MyLib\ObjUtil\Traits;
1010

1111
use Inhere\Exceptions\GetPropertyException;
1212
use Inhere\Exceptions\NotFoundException;
1313
use Inhere\Exceptions\SetPropertyException;
1414

1515
/**
1616
* trait PropertyAccessByGetterSetterTrait
17-
* @package MyLib\Obj\Traits
17+
* @package MyLib\ObjUtil\Traits
1818
* ```
1919
* class A
2020
* {

src/Traits/SingletonTrait.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
* Time: 下午7:31
77
*/
88

9-
namespace MyLib\Obj\Traits;
9+
namespace MyLib\ObjUtil\Traits;
1010

11-
use MyLib\Obj\Obj;
11+
use MyLib\ObjUtil\Obj;
1212

1313
/**
1414
* Trait SingletonTrait
15-
* @package MyLib\Obj\Traits
15+
* @package MyLib\ObjUtil\Traits
1616
*/
1717
trait SingletonTrait
1818
{

src/Traits/StdObjectTrait.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
* Time: 下午2:25
77
*/
88

9-
namespace MyLib\Obj\Traits;
9+
namespace MyLib\ObjUtil\Traits;
1010

1111
use Inhere\Exceptions\UnknownCalledException;
12-
use MyLib\Obj\Obj;
12+
use MyLib\ObjUtil\Obj;
1313

1414
/**
1515
* Class StdObjectTrait
16-
* @package MyLib\Obj\Traits
16+
* @package MyLib\ObjUtil\Traits
1717
*/
1818
trait StdObjectTrait
1919
{

test/boot.php

+7-7
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\File\Example\\')) {
14-
$path = str_replace('\\', '/', substr($class, strlen('MyLib\File\Example\\')));
15-
$file = dirname(__DIR__) . "/examples/{$path}.php";
16-
} elseif (0 === strpos($class,'MyLib\File\Test\\')) {
17-
$path = str_replace('\\', '/', substr($class, strlen('MyLib\File\Test\\')));
13+
if (0 === strpos($class,'MyLib\ObjUtil\Example\\')) {
14+
$path = str_replace('\\', '/', substr($class, strlen('MyLib\ObjUtil\Example\\')));
15+
$file = dirname(__DIR__) . "/example/{$path}.php";
16+
} elseif (0 === strpos($class,'MyLib\ObjUtil\Test\\')) {
17+
$path = str_replace('\\', '/', substr($class, strlen('MyLib\ObjUtil\Test\\')));
1818
$file = dirname(__DIR__) . "/{$path}.php";
19-
} elseif (0 === strpos($class,'MyLib\File\\')) {
20-
$path = str_replace('\\', '/', substr($class, strlen('MyLib\File\\')));
19+
} elseif (0 === strpos($class,'MyLib\ObjUtil\\')) {
20+
$path = str_replace('\\', '/', substr($class, strlen('MyLib\ObjUtil\\')));
2121
$file = dirname(__DIR__) . "/src/{$path}.php";
2222
}
2323

0 commit comments

Comments
 (0)