PHP code example of kraenzle-ritter / nara-risk
1. Go to this page and download the library: Download kraenzle-ritter/nara-risk 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/ */
kraenzle-ritter / nara-risk example snippets
use KraenzleRitter\NaraRisk\Services\NaraAssessmentService;
$service = app(NaraAssessmentService::class);
$result = $service->assessFile('fmt/412'); // PDF 1.7
echo $result['risk_level']; // "Low"
echo $result['category']; // "Textual"
echo $result['recommended_action']; // "Retain"
// Get all supported PRONOM IDs
$ids = $service->getSupportedPronomIds();
// Get format statistics
$stats = $service->getFormatStatistics();
// Check cache status
$cacheInfo = $service->getCacheInfo();