Skip to content

Commit

Permalink
Merge pull request #99 from TwistPHP/development
Browse files Browse the repository at this point in the history
Release of v3.0.5
  • Loading branch information
ahosgood committed Jan 11, 2017
2 parents f055bb0 + bd652e6 commit 722c43f
Show file tree
Hide file tree
Showing 112 changed files with 2,787 additions and 1,374 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,4 +1,5 @@
.idea
node_modules
.DS_Store
*.log
*.log
docs/resources
5 changes: 1 addition & 4 deletions .travis.yml
@@ -1,14 +1,11 @@
language: php

php:
- 5.3
- 5.4
- 5.5
env GULP=ON
- 5.6
env COVERALLS=ON
- 7.0
# - hhvm
- nightly

services:
Expand Down Expand Up @@ -46,4 +43,4 @@ notifications:
on_failure: always

after_success:
- if [ "$COVERALLS" = 'ON' ]; then ./vendor/bin/coveralls -v; fi;
- if [ "$COVERALLS" = 'ON' ]; then ./vendor/bin/coveralls -v; fi;
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -27,6 +27,10 @@ Code examples can also be found [in the examples area](https://twistphp.com/exam

Please use the [GitHub's issue tracker](https://github.com/TwistPHP/TwistPHP/issues) to report any problems.

### Modifications

The CSS and JS resources for TwistPHP are compiled using Gulp. After cloning the repository, you can install the necessary packages with `npm install` and then compile using `gulp`. The source files for all the resources can be found in the `/src/Core/Resources/twist` directory.

### Branches

For branching, please use the 'development' branch. All updates apart from hotfixes will get pushed from the [development branch](https://github.com/TwistPHP/TwistPHP/tree/development) to the master.
Expand Down
4 changes: 2 additions & 2 deletions dist/twist/Classes/Autoload.class.php
Expand Up @@ -35,7 +35,7 @@ class Autoload{

/**
* Initialise the AutoLoader and register the class as an AutoLoader
* @param $strBaseDir Base directory of the framework
* @param string $strBaseDir Base directory of the framework
*/
public static function init($strBaseDir){
self::$strBaseDir = $strBaseDir;
Expand All @@ -44,7 +44,7 @@ public static function init($strBaseDir){

/**
* Handler for each individual request, the path for the required file will be worked out here
* @param $strRequest The full class and namespace of the file to be loaded
* @param string $strRequest The full class and namespace of the file to be loaded
* @throws \Exception
*/
public static function load($strRequest){
Expand Down
14 changes: 7 additions & 7 deletions dist/twist/Classes/Error.class.php
Expand Up @@ -38,10 +38,10 @@ function __construct(){

/**
* Get an array of the Apache request headers.
* @todo Needs to be re-written/optimised
*
* @return array
*/
public static function apacheRequestHeaders(){
public static function apacheRequestHeaders(){ //TODO: Needs to be re-written/optimised

$arrOut = array();
$regxHTTP = '/\AHTTP_/';
Expand Down Expand Up @@ -242,10 +242,10 @@ protected static function debugDataOutput($arrData){

/**
* PHP Error handler to capture all PHP errors so that they can be logged to a file or output into the debug window later.
* @param $intErrorNo
* @param $strError
* @param $strErrorFile
* @param $intErrorLine
* @param integer $intErrorNo
* @param string $strError
* @param string $strErrorFile
* @param integer $intErrorLine
*/
public static function handleError($intErrorNo, $strError, $strErrorFile, $intErrorLine){

Expand Down Expand Up @@ -727,7 +727,7 @@ public static function outputLog(){

/**
* Detect the error type as a string based on an error number.
* @param $intErrorNo
* @param integer $intErrorNo
* @return string
*/
public static function getType($intErrorNo){
Expand Down
2 changes: 1 addition & 1 deletion dist/twist/Classes/Instance.class.php
Expand Up @@ -61,7 +61,7 @@ public static function retrieveObject($strObjectKey){

/**
* Removes the object from the instance holder and destroys the object.
* @param $strObjectKey
* @param string $strObjectKey
*/
public static function removeObject($strObjectKey){
unset(self::$arrFrameworkObjects[$strObjectKey]);
Expand Down
2 changes: 1 addition & 1 deletion dist/twist/Classes/Shutdown.class.php
Expand Up @@ -102,7 +102,7 @@ public static function callEvents(){

/**
* Remove a registered even from the event list
* @param $strEventKey
* @param string $strEventKey
*/
public static function cancelEvent($strEventKey){
unset(self::$arrCallbackEvents[$strEventKey]);
Expand Down
17 changes: 11 additions & 6 deletions dist/twist/Core/Controllers/Base.controller.php
Expand Up @@ -46,7 +46,7 @@ class Base{
* A function that is called by Routes both to ensure that the controller has been extended and so that we can pass in resources and information required by the controller.
*
* @param \Twist\Core\Utilities\Route $resRoute
* @param $arrRouteData
* @param array $arrRouteData
* @return bool
*/
final public function _extended($resRoute,$arrRouteData){
Expand Down Expand Up @@ -102,6 +102,7 @@ public function _fallback(){
/**
* Over-ride the base view for the current page only.
*
* @param null $mxdBaseView
* @return null|string
*/
public function _baseView($mxdBaseView = null){
Expand Down Expand Up @@ -181,7 +182,7 @@ public function _getReplacements(){
/**
* Function to call any controller response with the correct method prefix if any has been setup. If the response function is not found a 404 page will be output.
*
* @param $strCallFunctionName Name of the function to be called
* @param string $strCallFunctionName Name of the function to be called
* @return bool
*/
final protected function _callFunction($strCallFunctionName){
Expand Down Expand Up @@ -224,7 +225,7 @@ public function _upload($strFileKey,$strType = 'file'){
$arrOut = array();

if(count($_FILES) && array_key_exists($strFileKey,$_FILES)){
$resUpload = new \Twist\Core\Controllers\Upload();
$resUpload = new Upload();

if(is_array($_FILES[$strFileKey]['name'])){
foreach($_FILES[$strFileKey]['name'] as $intKey => $mxdValue){
Expand Down Expand Up @@ -265,7 +266,7 @@ final public function _error($intError){
* @return bool
*/
final public function _response($intError,$strCustomDescription = null){
Error::errorPage($intError,$strCustomDescription);
Error::response($intError,$strCustomDescription);
return false;
}

Expand Down Expand Up @@ -331,7 +332,7 @@ public function _model(){
* Get a Route URI var from the route vars, passing in null will return the whole array of route vars.
*
* @param null $strVarKey
* @return array|null
* @return string|array|null
*/
protected function _var($strVarKey = null){

Expand All @@ -344,7 +345,7 @@ protected function _var($strVarKey = null){

/**
* Process a view template file and return the output.
* @param $dirView
* @param string $dirView
* @param null $arrViewTags
* @param bool $blRemoveUnusedTags
* @return string
Expand All @@ -355,6 +356,10 @@ protected function _view($dirView,$arrViewTags = null,$blRemoveUnusedTags = fals

/**
* @alias _view
* @param string $dirView
* @param null $arrViewTags
* @param bool $blRemoveUnusedTags
* @return string
*/
protected function _render($dirView,$arrViewTags = null,$blRemoveUnusedTags = false){
return $this->_view($dirView,$arrViewTags,$blRemoveUnusedTags);
Expand Down
5 changes: 3 additions & 2 deletions dist/twist/Core/Controllers/BaseAJAX.controller.php
Expand Up @@ -40,7 +40,7 @@ public function _baseCalls(){
/**
* Set the status for the Ajax response, true by default
*
* @param $blStatus
* @param bool $blStatus
*/
public function _ajaxStatus($blStatus){
$this->blAjaxResponse = ($blStatus !== false);
Expand All @@ -62,7 +62,7 @@ public function _ajaxFail(){

/**
* Set a message to be returned to the Ajax call, can be used for an error message
* @param $strMessage
* @param string $strMessage
*/
public function _ajaxMessage($strMessage=''){
$this->strAjaxResponseMessage = $strMessage;
Expand All @@ -71,6 +71,7 @@ public function _ajaxMessage($strMessage=''){
/**
* Encode the response of the AJAX output
* @param array $mxdData
* @param bool $blDebug
* @return string
*/
public function _ajaxRespond($mxdData=array(), $blDebug = false){
Expand Down

0 comments on commit 722c43f

Please sign in to comment.