Skip to content

Commit

Permalink
Rename package to "cascading-filesystem"
Browse files Browse the repository at this point in the history
  • Loading branch information
lenton committed Jan 26, 2015
1 parent fa8fd13 commit e228930
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 27 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Add this package as a dependency in your project's composer.json configuration:

```json
require: {
"kohana/modules": "~1.0"
"kohana/cascading-filesystem": "~1.0"
}
```

Expand Down Expand Up @@ -72,11 +72,14 @@ Instantiation
-------------

```php
use Kohana\CascadingFilesystem\Filesystem\CascadingFilesystem;
use Doctrine\Common\Cache\ArrayCache;

// Instantiate cache
$cache = new Doctrine\Common\Cache\ArrayCache();
$cache = new ArrayCache();

// Instantiate CFS
$cfs = new Kohana\Modules\Filesystem\CascadingFilesystem($cache, [
$cfs = new CascadingFilesystem($cache, [
'directory/path/one',
'directory/path/two',
'directory/path/three',
Expand Down Expand Up @@ -118,8 +121,10 @@ Initialization
To initialize all of the enabled modules in the cascading filesystem:

```php
use Kohana\CascadingFilesystem\Initializer\ModulesInitializer;

// Initialize all modules
(new Kohana\Modules\Initializer\ModulesInitializer($cfs))->initialize();
(new ModulesInitializer($cfs))->initialize();
```

This should be done before you start using the modules as they may have prerequisites which are fulfilled by initialization.
Expand All @@ -130,7 +135,7 @@ Autoloading
To enable the autoloading of classes inside of modules you must first register the autoloader class by executing its register method:

```php
use Kohana\Modules\Autoloader\ModulesAutoloader;
use Kohana\CascadingFilesystem\Autoloader\ModulesAutoloader;

// Register Kohana module autoloader
(new ModulesAutoloader($cfs))->register();
Expand All @@ -139,7 +144,7 @@ use Kohana\Modules\Autoloader\ModulesAutoloader;
There is also a backwards compatibility autoloader for module classes which still use the old file naming convention (lowercase):

```php
use Kohana\Modules\Autoloader\LegacyModulesAutoloader;
use Kohana\CascadingFilesystem\Autoloader\LegacyModulesAutoloader;

// Register legacy Kohana module autoloader
(new LegacyModulesAutoloader($cfs))->register();
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kohana/modules",
"description": "Kohana modules manager",
"name": "kohana/cascading-filesystem",
"description": "A virtual filesystem formed from merging multiple directories",
"license": "BSD-3-Clause",
"require": {
"doctrine/cache": "~1.0"
Expand All @@ -10,5 +10,5 @@
"mikey179/vfsStream": "1.4.0",
"squizlabs/php_codesniffer": "~2.0"
},
"autoload": {"psr-4": {"Kohana\\Modules\\": "src"}}
"autoload": {"psr-4": {"Kohana\\CascadingFilesystem\\": "src"}}
}
4 changes: 2 additions & 2 deletions phpspec.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
suites:
kohana_suite:
namespace: Kohana\Modules
psr4_prefix: Kohana\Modules
namespace: Kohana\CascadingFilesystem
psr4_prefix: Kohana\CascadingFilesystem
4 changes: 2 additions & 2 deletions spec/Autoloader/LegacyModulesAutoloaderSpec.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace spec\Kohana\Modules\Autoloader;
namespace spec\Kohana\CascadingFilesystem\Autoloader;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Kohana\Modules\Filesystem\CascadingFilesystem;
use Kohana\CascadingFilesystem\Filesystem\CascadingFilesystem;

class LegacyModulesAutoloaderSpec extends ObjectBehavior
{
Expand Down
4 changes: 2 additions & 2 deletions spec/Autoloader/ModulesAutoloaderSpec.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace spec\Kohana\Modules\Autoloader;
namespace spec\Kohana\CascadingFilesystem\Autoloader;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Kohana\Modules\Filesystem\CascadingFilesystem;
use Kohana\CascadingFilesystem\Filesystem\CascadingFilesystem;

class ModulesAutoloaderSpec extends ObjectBehavior
{
Expand Down
2 changes: 1 addition & 1 deletion spec/Filesystem/CascadingFilesystemSpec.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace spec\Kohana\Modules\Filesystem;
namespace spec\Kohana\CascadingFilesystem\Filesystem;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand Down
4 changes: 2 additions & 2 deletions spec/Initializer/ModulesInitializerSpec.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace spec\Kohana\Modules\Initializer;
namespace spec\Kohana\CascadingFilesystem\Initializer;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Kohana\Modules\Filesystem\CascadingFilesystem;
use Kohana\CascadingFilesystem\Filesystem\CascadingFilesystem;

class ModulesInitializerSpec extends ObjectBehavior
{
Expand Down
4 changes: 2 additions & 2 deletions src/Autoloader/AbstractModulesAutoloader.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Kohana\Modules\Autoloader;
namespace Kohana\CascadingFilesystem\Autoloader;

use Kohana\Modules\Filesystem\CascadingFilesystem;
use Kohana\CascadingFilesystem\Filesystem\CascadingFilesystem;

/**
* Abstract modules autoloader.
Expand Down
2 changes: 1 addition & 1 deletion src/Autoloader/Autoloader.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Kohana\Modules\Autoloader;
namespace Kohana\CascadingFilesystem\Autoloader;

/**
* Autoloader interface.
Expand Down
2 changes: 1 addition & 1 deletion src/Autoloader/LegacyModulesAutoloader.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Kohana\Modules\Autoloader;
namespace Kohana\CascadingFilesystem\Autoloader;

/**
* Provides autoloading support of classes that follow Kohana's old class
Expand Down
2 changes: 1 addition & 1 deletion src/Autoloader/ModulesAutoloader.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Kohana\Modules\Autoloader;
namespace Kohana\CascadingFilesystem\Autoloader;

/**
* Provides autoloading support for Kohana module classes.
Expand Down
2 changes: 1 addition & 1 deletion src/Filesystem/CascadingFilesystem.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Kohana\Modules\Filesystem;
namespace Kohana\CascadingFilesystem\Filesystem;

use Doctrine\Common\Cache\Cache;

Expand Down
2 changes: 1 addition & 1 deletion src/Initializer/Initializer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Kohana\Modules\Initializer;
namespace Kohana\CascadingFilesystem\Initializer;

/**
* Initializer.
Expand Down
4 changes: 2 additions & 2 deletions src/Initializer/ModulesInitializer.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Kohana\Modules\Initializer;
namespace Kohana\CascadingFilesystem\Initializer;

use Kohana\Modules\Filesystem\CascadingFilesystem;
use Kohana\CascadingFilesystem\Filesystem\CascadingFilesystem;

/**
* Modules Initializer.
Expand Down

0 comments on commit e228930

Please sign in to comment.