PHP code example of particle-academy / prism-workspace
1. Go to this page and download the library: Download particle-academy/prism-workspace 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/ */
particle-academy / prism-workspace example snippets
use Prism\Workspace\Facades\PrismWorkspace;
$workspace = PrismWorkspace::for($session);
$workspace->write('reports/q1.md', $content);
$workspace->read('reports/q1.md');
$workspace->list(); // streamed, not materialised
use Prism\Workspace\Security\CorpusRunner;
$report = (new CorpusRunner)->against(PrismWorkspace::for($session));
if (! $report->passed()) {
throw new RuntimeException($report->summary());
}