Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Commit

Permalink
Initial upload
Browse files Browse the repository at this point in the history
  • Loading branch information
josantonius committed Mar 10, 2017
1 parent 0b2ca78 commit 10cf453
Show file tree
Hide file tree
Showing 14 changed files with 165 additions and 68 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git*/ export-ignore
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# CHANGELOG

## 1.0.0 - 2017-03-05
## 1.0.0 - 2017-03-09

* Added `App\Modules\ForkMeGitHub\Controller\ForkMeGitHub` class.
* Added `App\Modules\ForkMeGitHub\Controller\ForkMeGitHub::css()` method.
* Added `App\Modules\ForkMeGitHub\Controller\ForkMeGitHub::top()` method.
* Added `App\Modules\ForkMeGitHub\Controller\ForkMeGitHub::render()` method.

* Added `App\Modules\ForkMeGitHub\Model\ForkMeGitHub` class.

* Added `config/hooks.php` settings file.
* Added `config/routes.php` settings file.
* Added `App\Modules\ForkMeGitHub\Hooks` class.
* Added `App\Modules\ForkMeGitHub\Hooks::add()` method.

* Added `src/strip.php` file.
* Added `App\Modules\ForkMeGitHub\Routes` class.
* Added `App\Modules\ForkMeGitHub\Routes::add()` method.

* Added `src/template/view/strip.php` file.

* Added `assets/style.css` file.

* Added `fork-me-github.php` file.
29 changes: 21 additions & 8 deletions README-ES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,32 @@
- [Instalación](#instalación)
- [Requisitos](#requisitos)
- [Contribuir](#contribuir)
- [Autor](#autor)
- [Licencia](#licencia)
- [Copyright](#copyright)

---
Módulo de ejemplo para [aplicación](https://github.com/Eliasis-Framework/App) bajo [Eliasis PHP Framework](https://github.com/Eliasis-Framework/Eliasis). Este módulo agrega una tira 'Fork me on GitHub' en la parte superior de la página.

### Instalación

Puedes instalar este módulo aplicación utilizando [Composer](http://getcomposer.org/download/).
Tienes varias opciones para instalar un módulo en Eliasis PHP Framework:

$ composer create-project --prefer-dist eliasis-framework/app
**Composer**

La mejor manera de hacerlo es utilizando [Composer](http://getcomposer.org/download/).

$ composer require eliasis-framework/fork-me-github

**Git**

También puedes extraer el contenido del módulo Eliasis en app/modules/fork-me-github/ o utilizando [git clone](http://www.kernel.org/pub/software/scm/git/docs/git-clone.html) en el directorio de módulos.

$ cd app/modules
$ git clone https://github.com/Eliasis-Framework/fork-me-github.git

### Requisitos

Este framework es soportado por versiones de PHP 5.6 o superiores y es compatible con versiones de HHVM 3.0 o superiores.
Este módulo es soportado por versiones de PHP 5.6 o superiores y es compatible con versiones de HHVM 3.0 o superiores.

### Contribuir
1. Comprobar si hay incidencias abiertas o abrir una nueva para iniciar una discusión en torno a un fallo o función.
Expand All @@ -36,10 +47,12 @@ Este framework es soportado por versiones de PHP 5.6 o superiores y es compatibl

Esto está pensado para proyectos grandes y de larga duración.

### Autor
### Licencia

Este proyecto está licenciado bajo la **licencia MIT**. Consulta el archivo [LICENSE](LICENSE) para más información.

Mantenido por [Josantonius](https://github.com/Josantonius/).
### Copyright

### Licencia
2017 Josantonius, [josantonius.com](https://josantonius.com/)

Este proyecto está licenciado bajo la **licencia MIT**. Consulta el archivo [LICENSE](LICENSE) para más información.
Si te ha resultado útil... ¡házmelo saber! Sígueme en [Twitter](https://twitter.com/Josantonius).
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,29 @@
- [Installation](#installation)
- [Requirements](#requirements)
- [Contribute](#contribute)
- [Author](#author)
- [Licensing](#licensing)
- [Copyright](#copyright)

---

Sample module for [application](https://github.com/Eliasis-Framework/App) under [Eliasis PHP Framework](https://github.com/Eliasis-Framework/Eliasis). This module add a strip 'Fork me on GitHub' at the top of the page.

### Installation

You can install this application using [Composer](http://getcomposer.org/download/).
You have several options to install a module in Eliasis PHP Framework:

$ composer create-project --prefer-dist eliasis-framework/app
**Composer**

The best way to do this is to use [Composer](http://getcomposer.org/download/).

$ composer require eliasis-framework/fork-me-github

**Git**

You can also extract the Eliasis module content in app/modules/fork-me-github/ or use [git clone](http://www.kernel.org/pub/software/scm/git/docs/git-clone.html) in the modules directory.

$ cd app/modules
$ git clone https://github.com/Eliasis-Framework/fork-me-github.git

### Requirements

Expand All @@ -37,10 +48,12 @@ This framework is supported by PHP versions 5.6 or higher and is compatible with

This is intended for large and long-lived objects.

### Author
### Licensing

This project is licensed under **MIT license**. See the [LICENSE](LICENSE) file for more info.

Maintained by [Josantonius](https://github.com/Josantonius/).
### Copyright

### Licensing
2017 Josantonius, [josantonius.com](https://josantonius.com/)

This project is licensed under **MIT license**. See the [LICENSE](LICENSE) file for more info.
If you found this release useful please let the author know! Follow on [Twitter](https://twitter.com/Josantonius).
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
"role": "Developer"
}
],
"minimum-stability": "dev",
"prefer-stable" : true,
"support": {
"issues": "https://github.com/Eliasis-Framework/fork-me-github/issues",
"forum": "http://stackoverflow.com/tags/eliasis",
"source": "https://github.com/Eliasis-Framework/fork-me-github"
},
"require": {
"eliasis-framework/installers": "*"
},
Expand Down
Empty file added config/empty
Empty file.
23 changes: 0 additions & 23 deletions config/hooks.php

This file was deleted.

18 changes: 0 additions & 18 deletions config/routes.php

This file was deleted.

22 changes: 22 additions & 0 deletions fork-me-github.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
* Eliasis PHP Framework application module
*
* @author Josantonius - [email protected]
* @copyright Copyright (c) 2017
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
* @link https://github.com/Eliasis-Framework/fork-me-github
* @since 1.0.0
*/

return [

'name' => 'ForkMeGitHub',
'version' => '1.0.0',
'description' => 'Add a strip "Fork me on GitHub" at the top of the page.',
'uri' => 'https://github.com/Eliasis-Framework/fork-me-github',
'author' => 'Josantonius',
'author-uri' => 'https://josantonius.com/',
'license' => 'MIT',

];
13 changes: 7 additions & 6 deletions src/Controller/ForkMeGitHub.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
* @author Josantonius - [email protected]
* @copyright Copyright (c) 2017
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
* @link https://github.com/Eliasis-Framework/Modules
* @link https://github.com/Eliasis-Framework/fork-me-github
* @since 1.0.0
*/

namespace App\Modules\ForkMeGitHub\Controller;

use Josantonius\Asset\Asset,
Eliasis\Module\Module,
Eliasis\Controller\Controller;

/**
Expand All @@ -21,25 +22,25 @@
*/
class ForkMeGitHub extends Controller {

const ASSETS_URL = MODULES_URL . 'fork-me-github' . DS . 'assets' . DS;

/**
* Actions for css hook.
*
* @since 1.0.0
*/
public function css() {

Asset::css(self::ASSETS_URL . 'css' . DS . 'style.css');
Asset::css(Module::ForkMeGitHub('getUrl', 'css') . 'style.css');
}

/**
* Actions for top hook.
*
* @since 1.0.0
*/
public function top() {
public function render() {

$path = Module::ForkMeGitHub('getPath', 'view');

self::$view->renderizate(dirname(__DIR__) . DS . 'view' . DS . 'strip');
self::$view->renderizate($path . 'strip');
}
}
44 changes: 44 additions & 0 deletions src/Hooks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* Eliasis PHP Framework application module
*
* @author Josantonius - [email protected]
* @copyright Copyright (c) 2017
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
* @link https://github.com/Eliasis-Framework/fork-me-github
* @since 1.0.0
*/

namespace App\Modules\ForkMeGitHub;

use Eliasis\Hook\Hook,
Eliasis\Module\Module;

/**
* Hooks handler.
*
* @since 1.0.0
*/
class Hooks {

/**
* Add hooks to the application.
*
* @param array $hooks
*
* @since 1.0.0
*/
public static function add() {

$controller = Module::ForkMeGitHub('getNamespace', 'controller');

$hooks = [

'css' => $controller . 'ForkMeGitHub' . '@css',
'afterBody' => $controller . 'ForkMeGitHub' . '@render',

];

Hook::addHook($hooks);
}
}
2 changes: 1 addition & 1 deletion src/Model/ForkMeGitHub.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @author Josantonius - [email protected]
* @copyright Copyright (c) 2017
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
* @link https://github.com/Eliasis-Framework/Modules
* @link https://github.com/Eliasis-Framework/fork-me-github
* @since 1.0.0
*/

Expand Down
32 changes: 32 additions & 0 deletions src/Routes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
/**
* Eliasis PHP Framework application module
*
* @author Josantonius - [email protected]
* @copyright Copyright (c) 2017
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
* @link https://github.com/Eliasis-Framework/fork-me-github
* @since 1.0.0
*/

namespace App\Modules\ForkMeGitHub;

use Eliasis\Route\Route,
Eliasis\Module\Module;

/**
* Routes handler.
*
* @since 1.0.0
*/
class Routes {

/**
* Add routes to the application.
*
* @param array $routes
*
* @since 1.0.0
*/
public static function add() { }
}
File renamed without changes.

0 comments on commit 10cf453

Please sign in to comment.