pathsLoadedCheck() public method

Checks if the base and cache paths have been set, if not\ set then will use the $resource as the base path
public pathsLoadedCheck ( string $resource )
$resource string The resource to use to set the paths if they haven't been set
Beispiel #1
0
 /**
  * Creates the FileResource|ResourceProvider from the resource
  *
  * @param array  $resources The array of resources
  * @param string $type      The type of the resource
  */
 private function createResources(array $resources, $type)
 {
     foreach ($resources as $resource) {
         if ($type === "string") {
             $this->vars->pathsLoadedCheck($resource);
             if ($this->vars->cache->checkCache()) {
                 return;
             }
             if ($this->vars->resourceImported($resource)) {
                 continue;
             }
             $pos = $this->vars->addResource($resource);
             $resource = new FileResource($this, $resource);
             $this->vars->updateResource($resource, $pos);
         } else {
             $resource = new ResourceProvider($this->vars, $resource);
         }
         $this->addContent($resource->getContent());
     }
 }