Download the PHP package remetulla/tinymvc-php without Composer

On this page you can find all versions of the php package remetulla/tinymvc-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tinymvc-php

TinyMVC

Мини-фреймворк на PHP в стиле Yii2 (упрощённый MVC): web/index.php → Router → Controller → View/Layout, простые компоненты из конфига, ActiveRecord/Query, i18n, ассеты, обработка ошибок и логирование.

Репозиторий: remetulla17771/tinymvc
Лицензия: Apache 2.0 (см. LICENSE)


Возможности


Требования


Установка (Composer)

В корне проекта:

Убедись, что в web/index.php и bin/console.php подключён autoload:


Структура проекта


Быстрый старт (OpenServer / Apache)

1) Размести проект в домене (например tinymvc.loc). 2) DocumentRoot должен быть .../tinymvc/web (важно). 3) Проверь, что .htaccess работает (mod_rewrite включён).

Открой:

web/.htaccess


Как работает запрос

1) web/index.php:

2) App:

3) Router::resolve():


Routing

Формат:

Примеры:


Контроллеры

Файл: app/controllers/SiteController.php
Класс: SiteController
Методы: actionIndex(), actionView($id), и т.д.

Пример:


Views и Layouts

Для модулей:

Рендер из контроллера:


Компоненты и конфиг

app/config/web.php:


i18n (переводы)

Файлы: app/messages/<lang>/<category>.php (ru, kk, pr).

Использование:


База данных

Настройка

app/config/db.php:

Важно: не храни реальные пароли в git. Вынеси в .env/db.local.php и добавь в .gitignore.


Console Gii (консольные генераторы)

Показать список команд:

make:controller

make:model

make:crud

Опции:

Важно: make:model и make:crud требуют рабочее подключение к БД (Db::getInstance()), иначе не смогут прочитать схему таблицы.


Модули

make:module

Создаёт модуль со стартовым контроллером/вьюшкой/лейаутом:

Создаст:

Проверка:


Миграции

make:migration

Создаёт файл миграции в папке migrations/:

migrate

Применяет/откатывает миграции. Состояние хранится в таблице migration (по умолчанию).

Применить все новые миграции:

Откатить последнюю миграцию:

Опции:

Базовый класс Migration

Файл: app/Migration.php. В миграциях доступны хелперы:

Типы:


Безопасность

Сейчас в проекте может встречаться plain-text работа с паролями. Для реального проекта:

Рекомендуемый .gitignore:


Лицензия

Apache License 2.0 — см. файл LICENSE.


All versions of tinymvc-php with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-pdo Version *
ext-json Version *
fakerphp/faker Version ^1.24
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package remetulla/tinymvc-php contains the following files

Loading the files please wait ...