1. Go to this page and download the library: Download phy/phyneapple library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phy / phyneapple example snippets
/*
* in \PHY\Controller\Index::index_get()
*/
$this->getLayout()->getBlock('message', [
'someVariable' => 'banana!'
]);
/*
* in design/default/www/block/
*/
I passed variable "someVariable": <?=$someVariable
namespace \PHY\Controller
class Check extends \PHY\Controller\AController {
/**
* This matches GET /check
*/
public function index_get() {
$app = $this->getApp();
$user = $app->getUser();
$authorize = $app->get('model/authorize')->loadByRequest('controller/check');
if (!$authorize->exists()) {
$authorize->request = 'controller/admin';
$authorize->allow = 'admin super-admin';
$authorize->deny = 'all';
$app->get('database')->getManager()->save($authorize);
}
$authorize->setUser($user);
if (!$authorize->isAllowed()) {
$this->redirect('edgage');
}
}
}
$config = $app->get('config/funny/jokes');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.