Download the PHP package presentator/api without Composer
On this page you can find all versions of the php package presentator/api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download presentator/api
More information about presentator/api
Files in presentator/api
Informations about the package api
Presentator v2 REST API 
[!IMPORTANT] This repo is for the older Presentator v2 and it is no longer maintained.
Presentator v2 REST API server implementation, written in PHP and based on Yii2.
Detailed API reference could be found here - https://presentator.io/docs.
- Requirements
- Installation
- Development
This repository is READ-ONLY. Report issues and send pull requests in the main Presentator repository.
Requirements
-
Apache/Nginx HTTP server
-
SQL database (MySQL/MariadDB/PostgreSQL)
For MySQL up to 5.6 and MariaDB up to 10.1 you may need to set
innodb_large_prefix=1
andinnodb_default_row_format=dynamic
to prevent migration errors (see #104). -
PHP 7.1+ with the following extensions:
For more detailed check, run
php requirements.php
from the application root directory.In addition, here are some recommended
php.ini
configuration settings:
Installation
Before getting started make sure that you have checked the project requirements and installed Composer.
-
Clone or download the repo.
For security reasons, if you are using a shared hosting service it is recommended to place the project files outside from your default public_html(www) directory!
-
Setup a vhost/server address (eg.
http://api.presentator.local/
) and point it toweb/
.By default a generic
.htaccess
file will be created for you after initialization. If you are using nginx, you could check the following sample configuration. -
Run the following commands:
-
Create a new database (with
utf8mb4_unicode_ci
collation) and adjust the db, mailer and other component configurations inconfig/base-local.php
accordingly.All available app components with their default values could be found in
config/base.php
. -
Adjust the application parameters in
config/params-local.php.
.All available app parameters with their default values could be found in
config/params.php
. -
Apply DB migrations.
- (optional) Setup a cron task to process unread screen comments:
That's it! You should be able to make HTTP requests to the previously defined server address.
Additional console commands you may find useful:
Development
Running tests
Presentator uses Codeception as its primary test framework.
Running tests require an additional database, which will be cleaned up between tests.
Create a new database and edit the db component settings in config/test-local.php
and then run the following console commands:
Currently only functional tests are available.
Conventions
The project makes use of the following conventions:
- (PHP) Each class must follow the accepted PSR standards.
- (PHP) Each class method should have comment block tags based on PHPDoc (method description is optional).
- (DB) Use InnoDB table engine.
- (DB) Use
utf8mb4_unicode_ci
orutf8_unicode_ci
collation. - (DB) Table names must match with the corresponding AR model class name (eg.
UserProjectRel
). - (DB) Table columns must be in camelCase format (eg.
passwordResetToken
) - (DB) Each database change must be applied via Yii migrations.
- (DB) Whenever is possible add named foreign keys and indexes in the following format
fk_{FROM_TABLE}_to_{TO_TABLE}
andidx_{TABLE}_{COLUMN(S)}
(eg.fk_ProjectLink_to_Project
,idx_ProjectLink_slug
)
All versions of api with dependencies
yiisoft/yii2 Version ~2.0.16
yiisoft/yii2-swiftmailer Version ~2.0.0 || ~2.1.0
yiisoft/yii2-authclient Version ~2.1
yii2tech/ar-position Version ~1.0
creocoder/yii2-flysystem Version ^0.9.0
intervention/image Version ^2.4.2
google/apiclient Version ^2.0
firebase/php-jwt Version ^5.2
league/flysystem-aws-s3-v3 Version ^1.0