Skip to content

Commit

Permalink
Chapter 2 First Draft
Browse files Browse the repository at this point in the history
  • Loading branch information
eristoddle committed Nov 10, 2013
1 parent 9fcf9f6 commit 50815d3
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions app/config/services.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<?php

use Phalcon\DI\FactoryDefault,
Phalcon\Mvc\View,
Phalcon\Mvc\Url as UrlResolver,
Phalcon\Db\Adapter\Pdo\Mysql as DbAdapter,
Phalcon\Mvc\View\Engine\Volt as VoltEngine,
Phalcon\Mvc\Model\Metadata\Memory as MetaDataAdapter,
Phalcon\Session\Adapter\Files as SessionAdapter;

/**
* The FactoryDefault Dependency Injector automatically register the right services providing a full stack framework
*/
$di = new FactoryDefault();

/**
* The URL component is used to generate all kind of urls in the application
*/
Expand All @@ -21,7 +18,6 @@
$url->setBaseUri($config->application->baseUri);
return $url;
}, true);

/**
* Setting up the view component
*/
Expand All @@ -48,7 +44,6 @@

return $view;
}, true);

/**
* Database connection is created based in the parameters defined in the configuration file
*/
Expand All @@ -60,14 +55,12 @@
'dbname' => $config->database->dbname
));
});

/**
* If the configuration specify the use of metadata adapter use it or use memory otherwise
*/
$di->set('modelsMetadata', function() {
return new MetaDataAdapter();
});

/**
* Start the session the first time some component request the session service
*/
Expand Down

0 comments on commit 50815d3

Please sign in to comment.