Repository navigation
Home
Welcome to the alexa-php-framework wiki! Both the wiki and the framework are under heavy development and thus not considered stable as of now, but we are trying our best to keep it as stable as possible of course 👍
This framework is meant for fetching and processing requests send by an Amazon Echo device with object-oriented PHP.
For those who haven't heard about it yet: Amazon Echo is a cloud-based voice-interaction device. You just do things by saying them. Read more about it here: amazon.com.
For using this framework you will need at least the following:
- PHP >= 5.6
- cURL (if you want to make use of remote functionality of the DOMHelper and FileHelper)
You can install the framework by using composer and thus adding it into your projects composer.json as follows:
{
"name": "your project",
"description": "your projects description",
"type": "project",
"require": {
"mash-coding/alexa-php-framework": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/Mash-Coding/alexa-php-framework"
}
]
}After having created/updated your composer.json, run composer install (or composer update) and composer should do all the work for you!
Note: Currently this repository isn't listed in Packagist, which is why you have to specify the git-repository manually (and as dev-master).
For easiest setup (without changing the configs too much), we recommend you to use the following project structure:
.
|-- composer.json -- your projects composer config
|-- config/
| `-- alexa.json -- your projects config
|-- lang/
| `-- <languageCode>.json -- your projects localization/translation config (optional)
| `-- <skillName>/
| `-- <languageCode>.json -- a skills localization/translation config (optional)
|-- src/
| `-- skills/
| `-- <skillName>/ -- a skills PHP source directory
| `-- intents/
| `-- <intentClass>.php -- a skills intent PHP class
|-- vendor/ -- composer-generated vendor directory
| |-- mash-coding/
| | `-- alexa-php-framework/ -- this frameworks directory
|-- views/ -- directory for views
`-- web/ -- your projects public directory
`-- index.php