Skip to content

Commit

Permalink
Release version 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hungnguyenhp committed Feb 27, 2024
1 parent 2152d78 commit 7d2d981
Show file tree
Hide file tree
Showing 7 changed files with 283 additions and 261 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Change Log được viết theo biểu mẫu tại đây: https://keepachangelog.com/en/1.0.0/

## [1.1.2] - 2024/02/27

### What's Changed

- [x] Change `server.php` to `spark`

## [1.1.1] - 2024/02/02

### What's Changed
Expand Down
9 changes: 7 additions & 2 deletions app/config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
$route['default_controller'] = 'welcome/api';
$route['index'] = 'welcome/api';
if (is_cli()) {
$route['default_controller'] = 'welcome/command';
$route['index'] = 'welcome/api';
} else {
$route['default_controller'] = 'welcome/index';
$route['index'] = 'welcome/index';
}
$route['404_override'] = '';
$route['translate_uri_dashes'] = false;

130 changes: 65 additions & 65 deletions app/controllers/Welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,72 +9,72 @@
*/
class Welcome extends HungNG_CI_Base_Controllers
{
/**
* Welcome constructor.
*
* @author : 713uk13m <dev@nguyenanhung.com>
* @copyright: 713uk13m <dev@nguyenanhung.com>
*/
public function __construct()
{
parent::__construct();
$this->load->helper('directory');
}
/**
* Welcome constructor.
*
* @author : 713uk13m <dev@nguyenanhung.com>
* @copyright: 713uk13m <dev@nguyenanhung.com>
*/
public function __construct()
{
parent::__construct();
$this->load->helper('directory');
}

/**
* Function index
*
* @author : 713uk13m <dev@nguyenanhung.com>
* @copyright: 713uk13m <dev@nguyenanhung.com>
* @time : 23/06/2022 08:45
*/
public function index(): void
{
$data = [];
$data['author'] = arrayToObject(config_item('site_author'));
$data['site_data'] = arrayToObject(config_item('site_data'));
$data['tracking'] = arrayToObject(config_item('tracking_code'));
$this->load->view('my_welcome', $data);
}
/**
* Function index
*
* @author : 713uk13m <dev@nguyenanhung.com>
* @copyright: 713uk13m <dev@nguyenanhung.com>
* @time : 23/06/2022 08:45
*/
public function index(): void
{
$data = [];
$data['author'] = arrayToObject(config_item('site_author'));
$data['site_data'] = arrayToObject(config_item('site_data'));
$data['tracking'] = arrayToObject(config_item('tracking_code'));
$this->load->view('my_welcome', $data);
}

/**
* Function api
*
* @author : 713uk13m <dev@nguyenanhung.com>
* @copyright: 713uk13m <dev@nguyenanhung.com>
* @time : 23/06/2022 02:03
*/
public function api(): void
{
$response = [
'code' => StatusCodes::HTTP_OK,
'message' => StatusCodes::$statusTexts[StatusCodes::HTTP_OK],
'data' => [
'author_name' => POWERED_HUNGNG_SHORT_NAME,
'author_email' => HUNGNG_EMAIL,
'author_web' => HUNGNG_WEBSITE
],
'support' => [
'issues' => 'https://github.com/nguyenanhung/codeigniter3-skeleton/issues',
'wiki' => 'https://github.com/nguyenanhung/codeigniter3-skeleton/wiki',
'source' => 'https://github.com/nguyenanhung/codeigniter3-skeleton',
'packages' => 'https://packagist.org/packages/nguyenanhung/codeigniter3-skeleton',
],
'you' => [
'ip' => getIPAddress(),
'user_agent' => $this->input->user_agent(true)
]
];
$this->output
->set_status_header()
->set_content_type('application/json', 'utf-8')
->set_output(json_encode($response, JSON_PRETTY_PRINT))
->_display();
exit;
}
/**
* Function api
*
* @author : 713uk13m <dev@nguyenanhung.com>
* @copyright: 713uk13m <dev@nguyenanhung.com>
* @time : 23/06/2022 02:03
*/
public function api(): void
{
$response = [
'code' => StatusCodes::HTTP_OK,
'message' => StatusCodes::$statusTexts[StatusCodes::HTTP_OK],
'data' => [
'author_name' => POWERED_HUNGNG_SHORT_NAME,
'author_email' => HUNGNG_EMAIL,
'author_web' => HUNGNG_WEBSITE
],
'support' => [
'issues' => 'https://github.com/nguyenanhung/codeigniter3-skeleton/issues',
'wiki' => 'https://github.com/nguyenanhung/codeigniter3-skeleton/wiki',
'source' => 'https://github.com/nguyenanhung/codeigniter3-skeleton',
'packages' => 'https://packagist.org/packages/nguyenanhung/codeigniter3-skeleton',
],
'you' => [
'ip' => getIPAddress(),
'user_agent' => $this->input->user_agent(true)
]
];
$this->output
->set_status_header()
->set_content_type('application/json', 'utf-8')
->set_output(json_encode($response, JSON_PRETTY_PRINT))
->_display();
exit;
}

public function command(): void
{
ResponseOutput::writeLn("Welcome CodeIgniter 3 Framework at Time " . date('Y-m-d H:i:s'));
}
public function command(): void
{
ResponseOutput::writeLn("Welcome CodeIgniter 3 Framework at Time " . date('Y-m-d H:i:s'));
}
}
181 changes: 94 additions & 87 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,89 +1,96 @@
{
"name": "nguyenanhung/codeigniter3-skeleton",
"description": "CodeIgniter v3 Skeleton Application",
"keywords": [
"php",
"library",
"helper",
"skeleton",
"startapp",
"codeigniter",
"codeigniter3",
"codeigniter3-skeleton",
"codeigniter-helper",
"codeigniter-library",
"codeigniter-startapp",
"codeigniter-skeleton",
"docker-php",
"vercel-php",
"vercel-codeigniter",
"vercel-codeigniter-skeleton"
],
"type": "project",
"license": "GPL-3.0-or-later",
"homepage": "https://github.com/nguyenanhung/codeigniter3-skeleton",
"support": {
"issues": "https://github.com/nguyenanhung/codeigniter3-skeleton/issues",
"wiki": "https://github.com/nguyenanhung/codeigniter3-skeleton/wiki",
"source": "https://github.com/nguyenanhung/codeigniter3-skeleton"
},
"authors": [
{
"name": "Nguyen An Hung",
"email": "dev@nguyenanhung.com",
"homepage": "https://nguyenanhung.com",
"role": "Developer"
}
],
"require": {
"php": "^7.1 || ^8.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"nguyenanhung/codeigniter-framework": "^3.2",
"nguyenanhung/my-debug": "^3.0",
"nguyenanhung/requests": "^3.0",
"nguyenanhung/basic-firewall": "^2.0"
},
"require-dev": {
"bear8421/gravatar": "^1.0",
"tramtro/make-some-noise": "^1.0",
"roave/security-advisories": "dev-latest",
"nesbot/carbon": "^2",
"kint-php/kint": "^4"
},
"autoload": {
"psr-4": {
"nguyenanhung\\Support\\": "app/support/"
},
"classmap": [
"app/controllers/",
"app/libraries/",
"app/models/"
]
},
"suggest": {
"ext-curl": "Needs for support CURL",
"ext-json": "Needs for support JSON",
"ext-zend opcache": "Needs for support OpCache",
"ext-xml": "Needs for support XML",
"ext-simplexml": "Needs for support SimpleXML",
"nguyenanhung/codeigniter3-vercel-skeleton": "Deploying this package on Vercel with full compatibility",
"nguyenanhung/helpers": "Awesome Helpers - Powerful Library, Helpers and Tools",
"nguyenanhung/security": "Awesome Helpers - Wrapper for Security, Encrypt, Encode, Purifier",
"nguyenanhung/validation": "Awesome Validation - A fast, extensible & stand-alone PHP input validation class that allows you to validate any data",
"nguyenanhung/image": "Need support for Image Service",
"nguyenanhung/seo": "Need support for SEO",
"nguyenanhung/my-cache": "Need support for Powerful Cache Implement",
"nguyenanhung/my-debug": "Need support for Powerful Logger (Extend from Monolog)",
"nguyenanhung/requests": "Need support for Powerful HTTP Request",
"nguyenanhung/database": "Need support for Powerful SQL Database Tools (Customize Laravel Database)",
"nguyenanhung/monitor": "Need support for Send Monitor Message to Monitor Service",
"nguyenanhung/markdown": "Parser for Markdown",
"nguyenanhung/basic-firewall": "PHP Basic Firewall - Library providing IP filtering features"
},
"prefer-stable": true,
"scripts": {
"start": "php -S localhost:8080 -t public"
}
"name": "nguyenanhung/codeigniter3-skeleton",
"description": "CodeIgniter v3 Skeleton Application",
"keywords": [
"php",
"library",
"helper",
"skeleton",
"startapp",
"codeigniter",
"codeigniter3",
"codeigniter3-skeleton",
"codeigniter-helper",
"codeigniter-library",
"codeigniter-startapp",
"codeigniter-skeleton",
"docker-php",
"vercel-php",
"vercel-codeigniter",
"vercel-codeigniter-skeleton"
],
"type": "project",
"license": "GPL-3.0-or-later",
"homepage": "https://github.com/nguyenanhung/codeigniter3-skeleton",
"support": {
"issues": "https://github.com/nguyenanhung/codeigniter3-skeleton/issues",
"wiki": "https://github.com/nguyenanhung/codeigniter3-skeleton/wiki",
"source": "https://github.com/nguyenanhung/codeigniter3-skeleton"
},
"authors": [
{
"name": "Nguyen An Hung",
"email": "dev@nguyenanhung.com",
"homepage": "https://nguyenanhung.com",
"role": "Developer"
}
],
"config": {
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"prefer-stable": true,
"require": {
"php": "^7.1 || ^8.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"nguyenanhung/codeigniter-framework": "^3.2",
"nguyenanhung/my-debug": "^3.0",
"nguyenanhung/requests": "^3.0",
"nguyenanhung/basic-firewall": "^2.0"
},
"require-dev": {
"bear8421/gravatar": "^1.0",
"tramtro/make-some-noise": "^1.0",
"roave/security-advisories": "dev-latest",
"nesbot/carbon": "^2",
"kint-php/kint": "^4"
},
"autoload": {
"psr-4": {
"nguyenanhung\\Support\\": "app/support/"
},
"classmap": [
"app/controllers/",
"app/libraries/",
"app/models/"
]
},
"suggest": {
"ext-curl": "Needs for support CURL",
"ext-json": "Needs for support JSON",
"ext-zend opcache": "Needs for support OpCache",
"ext-xml": "Needs for support XML",
"ext-simplexml": "Needs for support SimpleXML",
"nguyenanhung/codeigniter3-vercel-skeleton": "Deploying this package on Vercel with full compatibility",
"nguyenanhung/helpers": "Awesome Helpers - Powerful Library, Helpers and Tools",
"nguyenanhung/security": "Awesome Helpers - Wrapper for Security, Encrypt, Encode, Purifier",
"nguyenanhung/validation": "Awesome Validation - A fast, extensible & stand-alone PHP input validation class that allows you to validate any data",
"nguyenanhung/image": "Need support for Image Service",
"nguyenanhung/seo": "Need support for SEO",
"nguyenanhung/my-cache": "Need support for Powerful Cache Implement",
"nguyenanhung/my-debug": "Need support for Powerful Logger (Extend from Monolog)",
"nguyenanhung/requests": "Need support for Powerful HTTP Request",
"nguyenanhung/database": "Need support for Powerful SQL Database Tools (Customize Laravel Database)",
"nguyenanhung/monitor": "Need support for Send Monitor Message to Monitor Service",
"nguyenanhung/markdown": "Parser for Markdown",
"nguyenanhung/basic-firewall": "PHP Basic Firewall - Library providing IP filtering features"
},
"scripts": {
"start": "php -S localhost:8080 -t public"
}
}
1 change: 1 addition & 0 deletions deploy/.prod.server.php → deploy/.prod.spark
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env php
<?php
date_default_timezone_set('Asia/Ho_Chi_Minh');
/**
Expand Down
Loading

0 comments on commit 7d2d981

Please sign in to comment.