addvilz / what_loaded
Determine What packages, classes and vendors were loaded during execution
dev-master
2015-08-03 16:07 UTC
This package is not auto-updated.
Last update: 2024-11-09 19:34:22 UTC
README
WhatLoaded is essentially a autoloader hook that listens for autoload calls and registers all classes that is loaded via autoloader. It is later possible to analyze this data to get insight on dependencies and whatever other metrics you could extract from this.
Installation
composer require addvilz/what_loaded
Usage
IMPORTANT: WhatLoaded::start
must be invoked AFTER any other autoload handlers are registered.
For example, if you are using composer, you must invoke WhatLoaded::start
after require '/vendor/autoload.php'
.
Rendering stats manually
\Addvilz\WhatLoaded\WhatLoaded::start(); // ... code \Addvilz\WhatLoaded\WhatLoaded::render();
Retrieving collected data
\Addvilz\WhatLoaded\WhatLoaded::start(); // ... code $data = \Addvilz\WhatLoaded\WhatLoaded::collect();
Rendering stats on shutdown
\Addvilz\WhatLoaded\WhatLoaded::start(); \Addvilz\WhatLoaded\WhatLoaded::renderOnShutdown(); // ... code
License
Licensed under terms and conditions of Apache 2.0 license.