Skip to content

Commit f10e927

Browse files
committed
cache component
1 parent 6c06c05 commit f10e927

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"phpixie/cli": "~3.0",
4040
"phpixie/console": "~3.0",
4141
"phpixie/migrate": "~3.0",
42+
"phpixie/cache": "~3.0",
4243
"psr/log": "~1.0.2"
4344
},
4445
"require-dev": {

src/PHPixie/Framework/Components.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,15 @@ public function migrate()
223223
return $this->instance('migrate');
224224
}
225225

226+
/**
227+
* Migrate
228+
* @return \PHPixie\Cache
229+
*/
230+
public function cache()
231+
{
232+
return $this->instance('cache');
233+
}
234+
226235
/**
227236
* @param string $name
228237
* @return mixed
@@ -465,6 +474,19 @@ protected function buildMigrate()
465474
);
466475
}
467476

477+
/**
478+
* @return \PHPixie\Cache
479+
*/
480+
protected function buildCache()
481+
{
482+
$configuration = $this->configuration();
483+
484+
return new \PHPixie\Cache(
485+
$configuration->cacheConfig(),
486+
$configuration->cacheRoot()
487+
);
488+
}
489+
468490
/**
469491
* @return Configuration
470492
*/

src/PHPixie/Framework/Configuration.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,16 @@ public function migrateConfig();
108108
* @return Root
109109
*/
110110
public function migrateRoot();
111+
112+
/**
113+
* Cache configuration
114+
* @return Data
115+
*/
116+
public function cacheConfig();
117+
118+
/**
119+
* Cache root
120+
* @return Root
121+
*/
122+
public function cacheRoot();
111123
}

0 commit comments

Comments
 (0)