Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Feb 4, 2020
1 parent 9ab7684 commit 76a5597
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/utils/File.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,14 @@ File::deleteDir('xxx');
```php
File::putContents('./a/b/c/1.txt', '123');
```

### absolute

获取绝对路径

相比 `realpath()` 函数,此方法不需要路径是真实存在的。

```php
// /a/b/c/1.jpg
File::absolute('/a/b/d/e/../../c/./1.jpg');
```
8 changes: 8 additions & 0 deletions doc/utils/Imi.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ echo Imi::getNamespacePath('Imi'), PHP_EOL;
echo Imi::getNamespacePath('ImiDemo\HttpDemo'), PHP_EOL;
```

### getNamespacePaths

根据命名空间获取真实路径,允许返回多个

```php
var_dump(Imi::getNamespacePaths('Imi'));
```

### getClassPropertyValue

获取类属性的值,值为beans配置或默认配置,支持传入Bean名称
Expand Down

0 comments on commit 76a5597

Please sign in to comment.