Skip to content

Commit

Permalink
Merge pull request #1 from Linfuby/master
Browse files Browse the repository at this point in the history
PHPDoc
  • Loading branch information
dracony committed Oct 15, 2015
2 parents 18ff468 + 8144cb1 commit ca9a2fa
Show file tree
Hide file tree
Showing 10 changed files with 130 additions and 27 deletions.
3 changes: 3 additions & 0 deletions src/PHPixie/Framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

abstract class Framework
{
/**
* @type Framework\Builder
*/
protected $builder;

public function __construct()
Expand Down
3 changes: 3 additions & 0 deletions src/PHPixie/Framework/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

class Assets
{
/**
* @type Components
*/
protected $components;
protected $instances = array();

Expand Down
30 changes: 24 additions & 6 deletions src/PHPixie/Framework/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,50 @@
abstract class Builder
{
protected $instances = array();


/**
* @return Assets
*/
public function assets()
{
return $this->instance('assets');
}


/**
* @return Components
*/
public function components()
{
return $this->instance('components');
}


/**
* @return Context
*/
public function context()
{
return $this->instance('context');
}


/**
* @return Extensions
*/
public function extensions()
{
return $this->instance('extensions');
}


/**
* @return HTTP
*/
public function http()
{
return $this->instance('http');
}


/**
* @return Processors
*/
public function processors()
{
return $this->instance('processors');
Expand Down
88 changes: 71 additions & 17 deletions src/PHPixie/Framework/Components.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,89 +4,143 @@

class Components
{
/**
* @type Builder
*/
protected $builder;
protected $instances = array();


/**
* @param Builder $builder
*/
public function __construct($builder)
{
$this->builder = $builder;
}


/**
* @return \PHPixie\Slice
*/
public function slice()
{
return $this->instance('slice');
}


/**
* @return \PHPixie\Config
*/
public function config()
{
return $this->instance('config');
}


/**
* @return \PHPixie\Debug
*/
public function debug()
{
return $this->instance('debug');
}


/**
* @return \PHPixie\Database
*/
public function database()
{
return $this->instance('database');
}


/**
* @return \PHPixie\Filesystem
*/
public function filesystem()
{
return $this->instance('filesystem');
}


/**
* @return \PHPixie\HTTP
*/
public function http()
{
return $this->instance('http');
}


/**
* @return \PHPixie\HTTPProcessors
*/
public function httpProcessors()
{
return $this->instance('httpProcessors');
}


/**
* @return \PHPixie\ORM
*/
public function orm()
{
return $this->instance('orm');
}


/**
* @return \PHPixie\Processors
*/
public function processors()
{
return $this->instance('processors');
}


/**
* @return \PHPixie\Template
*/
public function template()
{
return $this->instance('template');
}


/**
* @return \PHPixie\Route
*/
public function route()
{
return $this->instance('route');
}


/**
* @return \PHPixie\Security
*/
public function security()
{
return $this->instance('security');
}


/**
* @return \PHPixie\Auth
*/
public function auth()
{
return $this->instance('auth');
}


/**
* @return \PHPixie\AuthProcessors
*/
public function authProcessors()
{
return $this->instance('authProcessors');
}


/**
* @return \PHPixie\Paginate
*/
public function paginate()
{
return $this->instance('paginate');
}


/**
* @return \PHPixie\PaginateORM
*/
public function paginateOrm()
{
return $this->instance('paginateOrm');
Expand Down
10 changes: 8 additions & 2 deletions src/PHPixie/Framework/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ class Context implements \PHPixie\HTTP\Context\Container\Settable,
{
protected $httpContext;
protected $authContext;


/**
* @return \PHPixie\HTTP\Context
*/
public function httpContext()
{
return $this->httpContext;
Expand All @@ -17,7 +20,10 @@ public function setHttpContext($httpContext)
{
$this->httpContext = $httpContext;
}


/**
* @return \PHPixie\Auth\Context
*/
public function authContext()
{
return $this->authContext;
Expand Down
5 changes: 4 additions & 1 deletion src/PHPixie/Framework/Extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@

class Extensions
{
/**
* @type Builder
*/
protected $builder;

public function __construct($builder)
{
$this->builder = $builder;
}

public function templateExtensions()
{
return array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ class RouteTranslator implements \PHPixie\Template\Extensions\Extension
{

protected $name;

/**
* @type \PHPixie\Route\Translator
*/
protected $routeTranslator;

public function __construct($name, $routeTranslator)
Expand Down
8 changes: 7 additions & 1 deletion src/PHPixie/Framework/HTTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

class HTTP
{
/**
* @type Builder
*/
protected $builder;
protected $configData;

Expand All @@ -18,7 +21,10 @@ public function processor()
{
return $this->instance('processor');
}


/**
* @return \PHPixie\Route\Translator
*/
public function routeTranslator()
{
return $this->instance('routeTranslator');
Expand Down
3 changes: 3 additions & 0 deletions src/PHPixie/Framework/Processors.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

class Processors
{
/**
* @type Builder
*/
protected $builder;

public function __construct($builder)
Expand Down
3 changes: 3 additions & 0 deletions src/PHPixie/Framework/Processors/HTTP/ParseRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

class ParseRoute implements \PHPixie\Processors\Processor
{
/**
* @type \PHPixie\Route\Translator
*/
protected $routeTranslator;

public function __construct($routeTranslator)
Expand Down

0 comments on commit ca9a2fa

Please sign in to comment.