/** * 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; }
private function pushResource($stackName, $resource) { BA::assertIsEnum($stackName, array('css', 'js')); if (!isset($this->resources[$stackName][$resource])) { $this->resources[$stackName][$resource] = true; } return $this; }