Componette

Componette

orisai

orisai / source-map

Generate, validate and serialize source maps

download-cloud-line composer require orisai/source-map

Orisai
Source Map

Generate, validate and serialize source maps

📄 Check out our documentation.

💸 If you like Orisai, please make a donation. Thank you!

use Orisai\SourceMap\AnnotationSource;
use Orisai\SourceMap\ClassSource;
use ReflectionClass;

// Generate (and self-validate)
$source = new AnnotationSource(new ClassSource(new ReflectionClass(AnnotatedClass::class)));

// Print source
echo $source->toString(); // 'AnnotatedClass annotation'

// Serialize and un-serialize
$serialized = serialize($source);
$source = unserialize($serialized);
assert($source instanceof AnnotationSource);

// Ensure source is still valid after un-serialization
$source->isValid(); // bool

// Check last time source has changed
$source->getLastChange(); // DateTimeImmutable

No release at this moment. Try to create first one.

bar-chart-fill

Statistics

download-cloud-fill
626
star-fill
2
bug-fill
0
flashlight-fill
15d
price-tag-2-line

Badges

guide-fill

Dependencies

php (>=7.4.0 <8.3.0)
symfony/filesystem (^5.4.0|^6.0.0)
Componette Componette felix@nette.org