kubernetes php framework

Installs: 80

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:project

v1.1.0 2022-12-09 09:51 UTC

This package is not auto-updated.

Last update: 2024-04-26 18:06:09 UTC


README

KPF 는 Kubernetes PHP Framework 의 약자로, 쿠버네티스 환경에서 쉽게 PHP MVC 개발을 가능하게 하기 위해 만들었습니다. 어려운 기교 없이 쉽게 접근하여 서비스에 집중 할 수 있기를 바랍니다.

Requirements

requires the following:

  • Composer - Dependency Management for PHP
  • PHP 7.3 이상
  • twig 3.x
  • jonathanbak/mysqlilib 1.3

Installation

composer require jonathanbak/kpf

Start First Project

터미널에서 아래 스크립트를 실행하면 자동으로 폴더 구성 및 샘플 파일이 생성됩니다.

$ php ./vendor/jonathanbak/kpf/bin/install.php <namespace>
OK.

Test Cli

쉘용 스크립트 컨트롤러 파일 실행이 가능합니다.

$ php ./html/index.php /_sys/Test/main?type=test
array(1) {
  ["type"]=>
  string(4) "test"
}

Folder Structure

.
├── controllers     # URL에서 접근하는 controller 파일
├── models          # 모델 파일, 주요 로직
├── views           # View 폴더, tpl 파일
├── config              # 설정 파일
│   ├── common.route.json   # routing 파일
│   └── common.db.json      # DB 정보 설정 파일
├── html                # 실제 웹서버의 DOCUMENT_ROOT
│   ├── css             # css 파일
│   ├── image           # images 파일
│   ├── js              # javascript 파일
│   └── index.php       # 웹 index 파일 , 모든 요청 포워딩
├── _tmp            # 임시 폴더, 캐쉬파일등
├── logs            # 로그 폴더
├── vendor              # Composer 라이브러리 폴더
└── configure.json      # 메인 설정 파일