Download the PHP package phonetworks/pho-kernel without Composer
On this page you can find all versions of the php package phonetworks/pho-kernel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phonetworks/pho-kernel
More information about phonetworks/pho-kernel
Files in phonetworks/pho-kernel
Package pho-kernel
Short Description A simple microkernel implementation with Twitter-like functionality.
License MIT
Homepage https://phonetworks.org
Informations about the package pho-kernel
pho-kernel
A simple microkernel implementation with Twitter-like functionality by default. You may change the functionality simply by copy/pasting a new recipe from the presets directory. Check out "Working with Custom Recipes" below the README file for more information.
Requirements
The default pho-kernel requires:
- Redis server 4.0+
- PHP 7.2+
- Composer latest version
You may also test pho-kernel by using Vagrant. Check out "Testing" for more information.
Pho-Kernel used to depend on Neo4j Server 3.1+ for indexing. It no longer does as of version 3.0. But you may still use it if you prefer more advanced Cypher queries.
If you will use Neo4J for indexing, make sure you change your .env file to include INDEX_TYPE="neo4j" instead of INDEX_TYPE ="redis"
Testing
Testing allows you to get a feel of pho-kernel without bloating your system with servers such as Redis and Neo4j. However, you would still need to have Vagrant installed.
Once you have Vagrant, just type in the following in the directory where pho-kernel is installed:
Now you can play with the kernel. Check out "Getting Started" for more information.
Install
The recommended way to install pho-kernel is through composer.
Let's say, you want to install a kernel under a directory called . Here's what you type in the terminal:
This will install pho-kernel as well as its dependencies. Once installed, read/edit the bootstrapper script kernel.php. The sole purpose of the bootstrapper script is
- to set up the servers (e.g. Neo4J, Redis, loggers etc) given environment envirables set in file.
- provide you with the which you can use to interact with your graph, or embed in another environment (e.g. REST Server) for further functionality.
You will also need to set up a .env file to instruct the kernel about the services to use. A sample .env file is included as . Just copy/paste it as .env to get started with the basics.
Getting Started
- Make sure your .env file is functional; addressing your servers properly.
- Run on your terminal to switch to PHP shell. Then,
Working with Custom Recipes
If you'd like the kernel to run on a custom recipe, you must:
- Clone this repository.
- Change the composer.json file and replace with your custom recipe repo.
- Run to finish up with dependencies.
- Follow the steps described in the "Getting Started" section.
The presets directory comes with custom composer.json files that you can copy/paste on the existing one. This could enable you to run a Facebook or Twitter clone in a few simple steps.
However, if your goal is to run a completely custom recipe, then first of all, you need to:
- Form that recipe (possibly by cloning one of the existing ones in the https://github.com/pho-recipes repo).
- Make your recipe a composer package by uploading it to https://packagist.org
- Replace with your custom recipe repo in composer.json
- Run to finish up with dependencies.
- Follow the steps described in the "Getting Started" section.
The kernel.php file
If you are running pho-kernel on a custom set of compiled pgql files, make sure:
- The variables in Kernel configs (as shown by in kernel.php) have a proper set of "graph" and "user" classes set.
- Before booting up the kernel, a custom founder object is initialized and passed as an argument to the method.
License
MIT, see LICENSE.
All versions of pho-kernel with dependencies
phonetworks/pho-microkernel Version dev-master
pho-recipes/basic Version dev-master
pho-adapters/storage-filesystem Version dev-master
pho-adapters/database-redis Version dev-master
pho-adapters/events-local Version dev-master
pho-adapters/index-redis Version dev-master
vlucas/phpdotenv Version ^2.4