-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
33 lines (28 loc) · 962 Bytes
/
Copy pathexample.php
File metadata and controls
33 lines (28 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Project Structure Viewer - Usage Example
*
* This file demonstrates how to use the ProjectStructureViewer library
*
* @author Walter Nuñez
* @version 1.0
* @encoding UTF-8
*/
// Include the autoloader
require_once __DIR__ . '/vendor/autoload.php';
use ProjectStructureViewer\ProjectStructureViewer;
try {
echo "<h1>Project Structure Viewer - Examples</h1>\n";
echo "<hr>\n";
// Example 1: Basic usage - current directory
echo "<h2>Example 1: Current Directory Structure</h2>\n";
$viewer1 = ProjectStructureViewer::create();
$viewer1->display('Current Directory Structure');
} catch (Exception $e) {
echo "<div style='color: red; padding: 20px; border: 1px solid red; margin: 20px;'>";
echo "<h3>Error:</h3>";
echo "<p>" . htmlspecialchars($e->getMessage()) . "</p>";
echo "<p><strong>Solution:</strong> Make sure to run <code>composer install</code> first.</p>";
echo "</div>";
}
?>