このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
apricot:core:application-class [2020/05/05 10:11] y2sunlight 作成 |
apricot:core:application-class [2020/06/03 10:19] (現在) tanaka [テスト実行] |
||
---|---|---|---|
行 13: | 行 13: | ||
* [[apricot: | * [[apricot: | ||
* [[apricot: | * [[apricot: | ||
+ | * [[apricot: | ||
+ | * [[apricot: | ||
* [[apricot: | * [[apricot: | ||
- | * [[apricot:app: | + | * [[apricot: |
さて、準備が出来たのでいよいよコアのクラス群を作って行きたいと思います。 | さて、準備が出来たのでいよいよコアのクラス群を作って行きたいと思います。 | ||
行 211: | 行 213: | ||
{ | { | ||
return array_get($this-> | return array_get($this-> | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Checks if an application setting key is present | ||
+ | * @param string $dot Dot-notation key | ||
+ | * @return bool | ||
+ | */ | ||
+ | public function hasSetting(string $dot):bool | ||
+ | { | ||
+ | return array_has($this-> | ||
} | } | ||
行 303: | 行 315: | ||
$controller = " | $controller = " | ||
$instance = new $controller(); | $instance = new $controller(); | ||
- | | + | call_user_func_array(array($instance, |
} | } | ||
} | } | ||
行 327: | 行 339: | ||
{ | { | ||
return Core\Application:: | return Core\Application:: | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Checks if an application setting key is present | ||
+ | * @param string $dot Dot-notation key | ||
+ | * @return bool | ||
+ | */ | ||
+ | function app_has($dot = null) | ||
+ | { | ||
+ | return Core\Application:: | ||
} | } | ||
行 472: | 行 494: | ||
$r-> | $r-> | ||
{ | { | ||
+ | // Home | ||
// TODO: Stub Version | // TODO: Stub Version | ||
$r-> | $r-> | ||
行 489: | 行 512: | ||
ここまでの実装で一度実行してみましょう。以下のように index.php を編集します。 | ここまでの実装で一度実行してみましょう。以下のように index.php を編集します。 | ||
- | {{fa> | + | {{fa> |
<code php index.php> | <code php index.php> | ||
<?php | <?php |