PHP code example of bluefission / bluecore

1. Go to this page and download the library: Download bluefission/bluecore 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/ */

    

bluefission / bluecore example snippets


use BlueFission\BlueCore\Installation\InstallationExecutor;
use BlueFission\BlueCore\Installation\JsonInstallationCheckpointStore;

$executor = (new InstallationExecutor(
    new JsonInstallationCheckpointStore($checkpointDirectory)
))
    ->validator(fn (array $context) => $hostPolicy->validate($context))
    ->lan);

use BlueFission\BlueCore\Gateway\GatewayDenied;

http_response_code(403);
echo 'Forbidden';

throw new GatewayDenied('Forbidden', 403);

use BlueFission\BlueCore\Integration\Presence\PresenceBridgeFactory;
use BlueFission\Presence\Bridge\BridgeContext;

$bridge = PresenceBridgeFactory::make();
$context = new BridgeContext();
$context->host = 'bluecore';
$context->authenticator = $authenticator;
$context->session = [
    'id' => $sessionId,
    'type' => 'browser',
];
$context->metadata = [
    'tenant_id' => $tenantId,
    'action' => 'authenticate',
];

$result = $bridge->bind($context);

$app->delegate('template', $renderer);

$output = template('admin', 'dashboard.vibe', [
    'title' => 'Dashboard',
]);