Skip to content

Commit

Permalink
PHPDoc inline documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Elbert committed Jul 4, 2013
1 parent 28564c9 commit c69aa1f
Show file tree
Hide file tree
Showing 15 changed files with 80 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Swiftlet/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

namespace Swiftlet;

/**
* Application class
*
* @property string $action
* @property array $args
* @property array $config
* @property Interfaces\Controller $controller
* @property string $controllerName
* @property array $hooks
* @property array $plugins
* @property string $rootPath
* @property array $singletons
* @property Interfaces\View $view
*/
class App implements Interfaces\App
{
protected
Expand Down
9 changes: 9 additions & 0 deletions Swiftlet/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

namespace Swiftlet;

/**
* Controller class
*
* @abstract
* @property Interfaces\App $app
* @property Interfaces\View $view
* @property string $title
*/
abstract class Controller implements Interfaces\Controller
{
protected
Expand All @@ -12,6 +20,7 @@ abstract class Controller implements Interfaces\Controller

/**
* Constructor
*
* @param Interfaces\App $app
* @param Interfaces\View $view
*/
Expand Down
5 changes: 5 additions & 0 deletions Swiftlet/Controllers/Error404.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

namespace Swiftlet\Controllers;

/**
* Error 404 controller
*
* @property $title
*/
class Error404 extends \Swiftlet\Controller
{
protected
Expand Down
5 changes: 5 additions & 0 deletions Swiftlet/Controllers/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

namespace Swiftlet\Controllers;

/**
* Index controller
*
* @property $title
*/
class Index extends \Swiftlet\Controller
{
protected
Expand Down
3 changes: 3 additions & 0 deletions Swiftlet/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@

namespace Swiftlet;

/**
* Exception class
*/
class Exception extends \Exception
{ }
3 changes: 3 additions & 0 deletions Swiftlet/Interfaces/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Swiftlet\Interfaces;

/**
* Application interface
*/
interface App
{
public function run();
Expand Down
3 changes: 3 additions & 0 deletions Swiftlet/Interfaces/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Swiftlet\Interfaces;

/**
* Controller interface
*/
interface Controller
{
public function __construct(App $app, View $view);
Expand Down
3 changes: 3 additions & 0 deletions Swiftlet/Interfaces/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Swiftlet\Interfaces;

/**
* Model interface
*/
interface Model
{
public function __construct(App $app);
Expand Down
3 changes: 3 additions & 0 deletions Swiftlet/Interfaces/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Swiftlet\Interfaces;

/**
* Plugin interface
*/
interface Plugin
{
public function __construct(App $app, View $view, Controller $controller);
Expand Down
3 changes: 3 additions & 0 deletions Swiftlet/Interfaces/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Swiftlet\Interfaces;

/**
* View interface
*/
interface View
{
public function __construct(App $app, $name);
Expand Down
7 changes: 7 additions & 0 deletions Swiftlet/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

namespace Swiftlet;

/**
* Model class
*
* @abstract
* @property Interfaces\App $app
*/
abstract class Model implements Interfaces\Model
{
protected
Expand All @@ -10,6 +16,7 @@ abstract class Model implements Interfaces\Model

/**
* Constructor
*
* @param Interfaces\App $app
*/
public function __construct(Interfaces\App $app)
Expand Down
4 changes: 4 additions & 0 deletions Swiftlet/Models/Example.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

namespace Swiftlet\Models;

/**
* Example model
*/
class Example extends \Swiftlet\Model
{
/**
* Example method. This could be anything, really...
*
* @return string
*/
public function getHelloWorld()
Expand Down
8 changes: 8 additions & 0 deletions Swiftlet/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

namespace Swiftlet;

/**
* Plugin class
*
* @abstract
* @property Interfaces\App $app
* @property Interfaces\Controller $controller
* @property Interfaces\View $view
*/
abstract class Plugin implements Interfaces\Plugin
{
protected
Expand Down
3 changes: 3 additions & 0 deletions Swiftlet/Plugins/Example.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Swiftlet\Plugins;

/**
* Example plugin
*/
class Example extends \Swiftlet\Plugin
{
/**
Expand Down
7 changes: 7 additions & 0 deletions Swiftlet/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

namespace Swiftlet;

/**
* View class
*
* @property Interfaces\App $app
* @property array $variables
* @name array $name
*/
class View implements Interfaces\View
{
protected
Expand Down

0 comments on commit c69aa1f

Please sign in to comment.