Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-mollie committed Aug 4, 2016
2 parents a738492 + d862704 commit 4485150
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 8 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Parable PHP Framework Changelog

### 0.8.3

__Changes__
- Getting all the little details right.
- Moved Parable version to \Parable\Framework\App, as it should remain available even if the config is changed.
- Moved Able > Cli.
- Removed Error folder from mkdir list, as it's no longer included.
- Added \Parable\Framework\App to View magic properties, so it's available there as well.

### 0.8.2

__Changes__
- README.md updated

### 0.8.1

__Changes__
Expand Down
5 changes: 2 additions & 3 deletions src/Able/App.php → src/Cli/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright 2016, Robin de Graaf, devvoh webdevelopment
*/

namespace Parable\Able;
namespace Parable\Cli;

class App {

Expand Down Expand Up @@ -82,7 +82,7 @@ public function parseArguments(array $arguments) {

protected function init() {
$this->cli
->writeLine('Welcome to Able. We will now initialize your Parable install.')
->writeLine('Welcome to Parable. We will now initialize your Parable install.')
->br()
->writeLine('After completing this process, you will have an environment based on')
->writeLine('Parable, complete with folder structure files to start with.')
Expand All @@ -96,7 +96,6 @@ protected function init() {
mkdir($this->path->getDir('app/Controller', 0644, true));
mkdir($this->path->getDir('app/Model', 0644, true));
mkdir($this->path->getDir('app/View', 0644, true));
mkdir($this->path->getDir('app/View/Error', 0644, true));
mkdir($this->path->getDir('app/View/Home', 0644, true));
mkdir($this->path->getDir('public', 0644, true));

Expand Down
12 changes: 12 additions & 0 deletions src/Framework/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class App {
/** @var \Parable\ORM\Database */
protected $database;

/** @var string */
protected $version = '0.8.3';

/**
* @param \Parable\Filesystem\Path $path
* @param \Parable\Framework\Config $config
Expand Down Expand Up @@ -125,4 +128,13 @@ protected function loadRoutes() {
return $this;
}

/**
* Return the version number
*
* @return string
*/
public function getVersion() {
return $this->version;
}

}
2 changes: 1 addition & 1 deletion src/Framework/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
$autoloader->register();

if (PHP_SAPI === 'cli') {
return \Parable\DI\Container::get(\Parable\Able\App::class);
return \Parable\DI\Container::get(\Parable\Cli\App::class);
}
return \Parable\DI\Container::get(\Parable\Framework\App::class);
1 change: 1 addition & 0 deletions src/Framework/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @property \Parable\Events\Dock $dock
* @property \Parable\Events\Hook $hook
* @property \Parable\Filesystem\Path $path
* @property \Parable\Framework\App $app
* @property \Parable\Framework\Config $config
* @property \Parable\Framework\Dispatcher $dispatcher
* @property \Parable\Framework\Log $log
Expand Down
3 changes: 1 addition & 2 deletions structure/app/Config/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public function getSortOrder() {
public function getValues() {
return [
'app' => [
'title' => 'Parable',
'version' => '0.8.1',
'title' => 'Parable'
],
];
}
Expand Down
4 changes: 2 additions & 2 deletions structure/app/View/Home/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Hello from <?=$this->config->get('app.title');?> <?=$this->config->get('app.version');?></title>
<title>Hello from <?=$this->config->get('app.title');?> <?=$this->app->getVersion();?></title>

<!-- Raleway font from google fonts -->
<link href='https://fonts.googleapis.com/css?family=Raleway:100,400' rel='stylesheet' type='text/css'>
Expand Down Expand Up @@ -63,7 +63,7 @@

<article class="container">
<header>
<?=$this->config->get('app.title');?> <?=$this->config->get('app.version');?>
<?=$this->config->get('app.title');?> <?=$this->app->getVersion();?>
</header>
<aside>
PHP framework by <a href="http://devvoh.com">devvoh</a>
Expand Down

0 comments on commit 4485150

Please sign in to comment.