Add the event listener for the awards #155

This commit is contained in:
Nabeel Shahzad
2018-03-17 00:55:39 -05:00
parent 31b9195a6e
commit 26f00ccaae
9 changed files with 127 additions and 53 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace App\Support;
use Symfony\Component\ClassLoader\ClassMapGenerator;
class ClassLoader
{
/**
* @param $path
* @return array
*/
public static function getClassesInPath($path)
{
$classes = [];
if (!file_exists($path)) {
return [];
}
$all_classes = array_keys(ClassMapGenerator::createMap($path));
foreach ($all_classes as $cl) {
$klass = new $cl;
$classes[] = $klass;
}
return $classes;
}
}