Download the PHP package visavi/motor without Composer
On this page you can find all versions of the php package visavi/motor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package motor
Motor CMS
A content management system that keeps everything in csv files. No database server to install, configure or back up: unpack the files, run the migrations and the site is up.
Read this in Russian.
What it is
Articles with comments, tags, ratings and attachments, a guestbook, user
profiles with avatars, notifications, favourites, a search and an admin area —
built on Slim, Plates
and motor-orm, with tables living in
storage/database/*.csv.
It suits small sites and blogs, where a database server costs more attention than the content does. It does not suit sites where many people write at the same time: a write rewrites the whole table file.
Requirements
- PHP 8.5+
- extensions:
curl,mbstring,zip,gd - Composer
- Apache with
mod_rewrite, or nginx pointed atpublic/
Installation
migrate creates the tables in storage/database and fills in the settings.
Point the web server at public/; the .htaccess in the root already
redirects there when the document root is the project itself.
storage and public/uploads have to be writable by the web server.
Register the first account through /register, then make it the owner by hand:
the role is the fifth column of storage/database/users.csv, and user there
becomes boss.
Every other account is then managed from the admin area.
Layout
Console
Data
A model declares its table and is a row of it. Columns are named by the file, casts turn the strings of csv into the types the code expects, and whatever a row can answer about itself is a method of the model:
Reading is asked of a query, never of a row:
Controllers do not query directly — a repository holds the queries a page needs, and is handed to the controller by the container:
The full orm reference is in motor-orm,
and the site serves it at /docs as well.
Schema changes
A migration names the model and the columns, and applies them in one pass:
Files are named Y_m_d_His_what_it_does.php and live in database/migrations.
Settings
Settings are rows of settings.csv, edited in the admin area under
/admin/settings and read anywhere through setting():
They cover the name and title of the site, registration and email confirmation, lengths of articles, comments and guestbook messages, upload limits, image sizes, the captcha and how much fits on a page.
Templates
Plates, in resources/views. A layout, partials for the header, sidebar and
footer, and a folder per section. Pagination is printed by the application:
which renders resources/views/app/_paginator.php — the place to change the
markup.
Deployment
deploy.yaml is a Deployer recipe: storage and
public/uploads are shared between releases, .env stays outside the
repository.
Development
Errors are shown when displayErrorDetails in app/settings.php is on; leave
it off in production, where the log is written to storage/logs/motor.log and
read from /admin/logs.
License
GPL-3.0-only
All versions of motor with dependencies
ext-curl Version *
ext-mbstring Version *
ext-zip Version *
guzzlehttp/guzzle Version ^7.7
intervention/image Version ^2.7
league/plates Version ^3.5
monolog/monolog Version ^2.9
php-di/slim-bridge Version ^3.3
psr/simple-cache Version 2.0.0
shieldon/simple-cache Version ^1.3
slim/psr7 Version ^1.6
slim/slim Version ^4.11
symfony/console Version ^6.0
symfony/mailer Version ^6.0
visavi/captcha Version ^3.0
visavi/cleanup Version ^1.5
visavi/motor-orm Version ^4.2