Readme and comments updates

This commit is contained in:
Joey Kimsey
2025-02-02 18:08:59 -05:00
parent d2aea39758
commit 4fd9d8c06c
12 changed files with 69 additions and 114 deletions

View File

@ -1,94 +0,0 @@
# Contribution Guidelines for Houdini
Contributing to Houdini is completely voluntary and should follow all of the guidelines listed here in order to ensure the highest probability of acceptance. It is highly recommended to use a php linter to automate more of this process. The project is maintained on github and all contributions need to be submitted via pull request to their specific repository under the `dev` branch. In order to contribute, simply follow the instructions for [creating a pull request](#creating-a-pull-request) below.
## Pull Request Requirements
- All revisions must follow TTP naming conventions (see [Naming Conventions](#naming-conventions) Section)
- Include a clear and concise explanation of the features or changes included in your revision listed by file.
- All code must follow [PSR 2](http://www.php-fig.org/psr/psr-2/) standards
- prefer the use of [] for arrays over array()
- All functions must be documented with the exception of controller methods (see [Documentation](#documentation) Section)
- Controller methods may be doc-blocked when necessary for clarity (see [Documentation](#documentation) Section)
- All new Classes must include a class level doc-block (see [Documentation](#documentation) Section)
- Any new dependencies will have a longer validation process and should be accompanied by the required information (see [Dependencies](#dependencies) Section)
## Naming Conventions
- File names are to be lower case
- All class names must be upper case
- Any data being stored as a file must be saved in the `app/` directory, preferably the `app/config/` directory.
- Controllers must have a constructor and destructor incorporating the constructor and destructor in the Resources Controller
- (This will be an interface requirement soon)
- Views must be named using underscores for separation and must be prefixed with view_
## Dependencies
Whenever a dependency is updated or added, pull requests must include a section that answers the following questions.
- Why is this dependency required
- Could this be reasonably accomplished within the app by implementing new features in a later version? explain.
- What is the latest stable version that can be used
- What features are absolutely necessary for your feature or modification to work
## Documentation
### Classes
New classes must be prefaced with a doc-block following this style:
```
/**
* controllers/admin.php
*
* This is the admin controller.
*
* @version 3.0
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/Houdini
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
```
From top to bottom:
- Filename on the second line
- A description for the file
- The TTP version this file was built for
`@version 1.0`
- The Authors name or alias and email
`@author first last <email@link.com>`
- A copy of the MIT license
`@license https://opensource.org/licenses/MIT [MIT LICENSE]`
- May include a link for more information
`@link http://link.com`
### Functions
Functions must be prefaced with a doc-block following this style:
```
/**
* Intended as a self-destruct session. If the specified session does not
* exist, it is created. If the specified session does exist, it will be
* destroyed and returned.
*
* @param string $name - Session name to be created or checked
* @param string $string - The string to be used if session needs to be
* created. (optional)
*
* @return bool|string - Returns bool if creating, and a string if the
* check is successful.
*/
```
From top to bottom:
- There must be a description of the functions intended usage on the second line
- All parameters should be documented like this
`@param [type] $name - description`
- Any function with a return statement must also be documented as such
`@return [type] - description`
## Creating a Pull Request
This is a simple explanation of how to create a pull request for changes to Houdini. You can find a detailed walk-through on how to [create a pull request](https://help.github.com/articles/creating-a-pull-request/) on github.
1. First ensure you have followed all the contributing guidelines
2. Squash your merge into a single revision. This will make it easier to view the changes as a whole.
3. You can submit a pull request [here](https://github.com/TheTempusProject/Houdini/compare)
4. Please submit all pull requests to the dev branch or they will be ignored.

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2024 Joey Kimsey
Copyright (c) 2025 Joey Kimsey
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -7,10 +7,50 @@ This functionality applies to several commonly utilized page components such as
## Installation
You can install houdini using composer or include the autoload functionality inside the bin folder.
To install simply use the composer command:
`php composer.phar require thetempusproject/houdini`
## Usage
Typical usage would be through including the package via composer.
```php
require_once VENDOR_DIRECTORY . 'autoload.php';
use TheTempusProject\Houdini\Classes\Template;
new Template;
Template::setTemplate( 'default' );
```
If you would like to use hermes autoloading, simply inclode the constants file and the autoload file inside `/bin/`.
```php
use TheTempusProject\Houdini\Classes\Template;
// Houdini Constants
if ( ! defined( 'HOUDINI_CONSTANTS_LOADED' ) ) {
if ( defined( 'HOUDINI_CONFIG_DIRECTORY' ) ) {
require_once HOUDINI_CONFIG_DIRECTORY . 'constants.php';
}
}
// Houdini Autoloader (Autoloader)
if ( ! defined( 'HOUDINI_AUTOLOADED' ) ) {
if ( defined( 'HOUDINI_ROOT_DIRECTORY' ) ) {
require_once HOUDINI_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
}
}
new Template;
Template::setTemplate( 'default' );
```
### Components
### Email
### Filters
@ -22,3 +62,12 @@ You can install houdini using composer or include the autoload functionality ins
## Constants / Settings
## Issues / Bugs / Contact
If anyone actually uses this library and runs into any issues, feel free to contact me and I'll look into it.
[Joey Kimsey](mailto:Joey@thetempusproject.com) - _Lead Developer_
[JoeyKimsey.com](https://JoeyKimsey.com)

View File

@ -4,9 +4,9 @@
*
* Handles the initial setup like autoloading, basic functions, constants, etc.
*
* @version 3.0
* @version 2.0.3
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/houdini
* @link https://TheTempusProject.com/libraries/Houdini
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Houdini;

View File

@ -4,9 +4,9 @@
*
* This class is for managing template components.
*
* @version 3.0
* @version 2.0.3
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/Houdini
* @link https://TheTempusProject.com/libraries/Houdini
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Houdini\Classes;

View File

@ -4,9 +4,9 @@
*
* This class is for managing template filters.
*
* @version 3.0
* @version 2.0.3
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/Core
* @link https://TheTempusProject.com/libraries/Houdini
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Houdini\Classes;

View File

@ -4,9 +4,9 @@
*
* This class is for managing template forms.
*
* @version 3.0
* @version 2.0.3
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/Core
* @link https://TheTempusProject.com/libraries/Houdini
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Houdini\Classes;

View File

@ -4,9 +4,9 @@
*
* This class is for managing template issues.
*
* @version 3.0
* @version 2.0.3
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/Core
* @link https://TheTempusProject.com/libraries/Houdini
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Houdini\Classes;

View File

@ -4,9 +4,9 @@
*
* This class is for managing template navigation including menus, pagination, and breadcrumbs.
*
* @version 3.0
* @version 2.0.3
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/Core
* @link https://TheTempusProject.com/libraries/Houdini
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Houdini\Classes;

View File

@ -4,9 +4,9 @@
*
* This class is for managing template navigation including menus, pagination, and breadcrumbs.
*
* @version 3.0
* @version 2.0.3
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/Core
* @link https://TheTempusProject.com/libraries/Houdini
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Houdini\Classes;

View File

@ -7,9 +7,9 @@
* into HTML, including: bbcodes, the data replacement structure, the
* filters, and other variables used to display application content.
*
* @version 3.0
* @version 2.0.3
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/Core
* @link https://TheTempusProject.com/libraries/Houdini
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Houdini\Classes;

View File

@ -4,9 +4,9 @@
*
* This class is for managing template views.
*
* @version 3.0
* @version 2.0.3
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com/Core
* @link https://TheTempusProject.com/libraries/Houdini
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Houdini\Classes;