Skip to content

Commit 6584c5c

Browse files
committed
README, CHANGELOG update
1 parent 8a54340 commit 6584c5c

File tree

4 files changed

+54
-11
lines changed

4 files changed

+54
-11
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
All Notable changes to `Vars` will be documented in this file
44

5+
## 0.3.0 - 2015-12-19
6+
7+
### Added
8+
- Add recursive dir toggle flag
9+
- Add suppression flag
10+
- Add if else flag
11+
- Add path trait
12+
13+
### Altered
14+
- Moved path logic to path trait
15+
16+
### Fixed
17+
- README format
18+
519
## 0.2.0 - 2015-12-16
620

721
### Added

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,21 @@ test_key_1:
203203
imports: sub/
204204
```
205205

206-
Importing directories is by default recursive and will search folders within folders, you can change this by adding a recursive toggle:
206+
Importing directories is by default not recursive and will not search folders within folders, you can change this by adding a recursive toggle:
207207
``` yml
208208
test_key_1:
209209
imports:
210210
resource: sub/
211-
recursive: false
211+
recursive: true
212+
```
213+
214+
or by adding a recursive flag:
215+
``` yml
216+
test_key_1:
217+
imports:
218+
resource: sub/*
212219
```
220+
213221
As with the loading files, you can bulk import dirs with one recursive toggle:
214222
``` yml
215223
test_key_1:
@@ -238,7 +246,13 @@ The suppress exceptions flag `@` -- suppresses files not found exceptions. eg:
238246
imports: @file_does_not_exist.yml
239247
```
240248

241-
You can also combine the above two flags, so if the else file option does not exist, it won't throw an exception, eg:
249+
The recursive flag makes it so directories within directories are searched for files. eg:
250+
``` yml
251+
imports:
252+
resource: sub/*
253+
```
254+
255+
You can also combine the above flags, so if the else file option does not exist, it won't throw an exception, eg:
242256

243257
```yml
244258
imports: example_1.yml ?: @example_2.yml

src/Traits/PathTrait.php

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
<?php
2+
23
/**
3-
* Created by PhpStorm.
4-
* User: miles
5-
* Date: 19/12/15
6-
* Time: 11:32
4+
* This file is part of the m1\vars library
5+
*
6+
* (c) m1 <hello@milescroxford.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*
11+
* @package m1/vars
12+
* @version 0.3.0
13+
* @author Miles Croxford <hello@milescroxford.com>
14+
* @copyright Copyright (c) Miles Croxford <hello@milescroxford.com>
15+
* @license http://github.com/m1/vars/blob/master/LICENSE
16+
* @link http://github.com/m1/vars/blob/master/README.MD Documentation
717
*/
818

919
namespace M1\Vars\Traits;
1020

21+
/**
22+
* Path trait gives common operation functions needed for Paths in Vars
23+
*
24+
* @since 0.1.0
25+
*/
1126
trait PathTrait
1227
{
1328
/**
@@ -30,8 +45,9 @@ public function getPath()
3045
/**
3146
* Set the Vars base path
3247
*
33-
* @param string $path The path to set
34-
*
48+
* @param string $path The path to set
49+
* @param boolean $check_writeable Check whether dir is writeable
50+
3551
* @throws \InvalidArgumentException If the path does not exist or is not writable
3652
*
3753
* @return \M1\Vars\Vars
@@ -52,4 +68,4 @@ public function setPath($path, $check_writeable = false)
5268
$this->path = realpath($path);
5369
return $this;
5470
}
55-
}
71+
}

src/Vars.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ private function makePaths($options)
159159
$this->setPath($options['path']);
160160

161161
if (is_null($options['cache_path']) && !is_null($options['path'])) {
162-
163162
$this->cache->setPath($options['path']);
164163
$this->paths_loaded = true;
165164
}

0 commit comments

Comments
 (0)