Exemplo n.º 1
0
 /**
  * Pushes a resource onto the resource stack for the resource type
  *
  * For example, it when pushing a Js file with the name jquery.min.js,
  * it will add it to the stack for js files
  *
  * @param string $type
  * The resource type
  *
  * @param string $name
  * The name of the resource
  */
 public function pushResource($name)
 {
     BA::assertIsString($name);
     FA::assertFileExists($this->path($name));
     $this->resources[] = $this->trim($name);
     return $this;
 }
Exemplo n.º 2
0
 public static function init($path = '__resource_map__.php')
 {
     if (!self::$resourceMap) {
         FA::assertFileExists($path);
         self::$resourceMap = (require_once $path);
     }
 }