-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Langur/initial
Initial commit
- Loading branch information
Showing
22 changed files
with
1,169 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine On | ||
RewriteBase / | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule . index.php [L] | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Macaca - A simple contents management system for PHP | ||
|
||
## Overview | ||
Macaca is a content management system that provides a simple MVC framework. | ||
You can deploy a public directory or under a specific directory. | ||
Of course, you can also be extended using composer. | ||
|
||
## Deploy | ||
You have a choice of two methods. | ||
### Deploy a public directory | ||
The following files will be made available to the public. | ||
All files should then be routed to *public/index.php* . | ||
- public/index.php | ||
|
||
### Deploy under a specific directory | ||
The following files will be made available to the public. | ||
All files should then be routed to *index.php* . | ||
- index.php | ||
|
||
## License | ||
This software is distributed under the MIT License. Please read LICENSE for information on the software availability and distribution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Macaca Change Log | ||
|
||
## Version 0.0.1 (Thr, Jan 5 2023) | ||
- Initial public release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
/** | ||
* Macacaの設定ファイル | ||
* | ||
* @copyright Copyright (c) 2017-2023 Akihisa ONODA | ||
* @license https://github.com/Langur/macaca/blob/master/LICENSE MIT | ||
* @link https://github.com/Langur/macaca#readme | ||
* @author Akihisa ONODA <[email protected]> | ||
*/ | ||
|
||
/* ------------------------------------------------------------- | ||
* Macaca用定義 | ||
* ------------------------------------------------------------- */ | ||
define('LOADED_CONFIG', true); | ||
|
||
/* ------------------------------------------------------------- | ||
* PATH設定 | ||
* ------------------------------------------------------------- */ | ||
define('ROOT_URI', '/'); | ||
define('__ABSPATH__', dirname(__FILE__) . '/'); | ||
define('LIBPATH', __ABSPATH__ . 'libs/'); | ||
define('MODPATH', __ABSPATH__ . 'modules/'); | ||
define('ERROR_VIEW_PATH', __ABSPATH__ . 'view/error'); | ||
|
||
/* ------------------------------------------------------------- | ||
* PHPの設定変更 | ||
* ------------------------------------------------------------- */ | ||
ini_set("include_path", get_include_path() . PATH_SEPARATOR . LIBPATH); | ||
|
||
/* ------------------------------------------------------------- | ||
* 環境設定 | ||
* ------------------------------------------------------------- */ | ||
# SiteName | ||
define('SITE_NAME', 'Macaca'); | ||
define('SITE_EMAIL', 'webmaster@localhost'); | ||
define('SITE_USE_OGP', false); | ||
define('SITE_CACHE', '20230105'); | ||
|
||
# ERROR | ||
ini_set('display_errors', false); | ||
ini_set('error_reporting', E_ALL & ~E_STRICT & ~E_NOTICE & ~E_DEPRECATED); | ||
|
||
# DEBUG | ||
define('DEBUG_SITE', false); | ||
|
||
/* ------------------------------------------------------------- | ||
* 各種ロード | ||
* ------------------------------------------------------------- */ | ||
foreach (glob(LIBPATH . '*/*.php') as $path) { | ||
include $path; | ||
} | ||
foreach (glob(MODPATH . '*/class.php') as $path) { | ||
require_once $path; | ||
} | ||
foreach (glob(MODPATH . '*/main.php') as $path) { | ||
include $path; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* メインページのコントローラ | ||
* | ||
* Macacaにおける処理のコアとなります。 | ||
* 引数の監理やMVCの紐付けを行います。 | ||
* | ||
* @copyright Copyright (c) 2017-2023 Akihisa ONODA | ||
* @license https://github.com/Langur/macaca/blob/master/LICENSE MIT | ||
* @link https://github.com/Langur/macaca#readme | ||
* @author Akihisa ONODA <[email protected]> | ||
*/ | ||
|
||
$argv = $this->getARGV(); | ||
$view_engine = $this->getViewEngine(); | ||
|
||
# setString(文字列)で保持したデータはgetString()で読み出すことができる。 | ||
# StringはFoobarのように任意の文字列に置換可能。 | ||
$view_engine['templateengine']->setString("main"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* サブページのコントローラ | ||
* | ||
* Macacaにおける処理のコアとなります。 | ||
* 引数の監理やMVCの紐付けを行います。 | ||
* | ||
* @copyright Copyright (c) 2017-2023 Akihisa ONODA | ||
* @license https://github.com/Langur/macaca/blob/master/LICENSE MIT | ||
* @link https://github.com/Langur/macaca#readme | ||
* @author Akihisa ONODA <[email protected]> | ||
*/ | ||
|
||
$argv = $this->getARGV(); | ||
$view_engine = $this->getViewEngine(); | ||
|
||
# setString(文字列)で保持したデータはgetString()で読み出すことができる。 | ||
# StringはFoobarのように任意の文字列に置換可能。 | ||
$view_engine['templateengine']->setString("sub"); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
/** | ||
* Macacaのmain処理 | ||
* | ||
* @copyright Copyright (c) 2017-2023 Akihisa ONODA | ||
* @license https://github.com/Langur/macaca/blob/master/LICENSE MIT | ||
* @link https://github.com/Langur/macaca#readme | ||
* @author Akihisa ONODA <[email protected]> | ||
*/ | ||
session_start(); | ||
include_once('./config.php'); | ||
require_once('./public/index.php'); |
Empty file.
Oops, something went wrong.