Skip to content

classes_reflection_resourceattribute.class

Daniel Spors edited this page Dec 19, 2023 · 2 revisions

Classes in file reflection/resourceattribute.class.php

class ResourceAttribute

Specifies that a resource file is needed. Note this above a class to force the resouce to be automatically searched and added the resulting output.

@attribute[Resource('myownscript.js')]	
@attribute[Resource('ineed/thisstyle.css')]	

Extends: WdfAttribute

Subclasses: ExternalResourceAttribute

Collect

Will collect all Resource attributes from a given classname Will also step down the inheritance graph to collect Resources from there.

Definition: public static function Collect($classname)

Returns: array Array of resource attributes

Parameters:

  • object|string $classname Classname or object to collect resources for

Resolve

Resolves this resource to a URL Will call resFile() to do so, so result will be callable from the current location.

Definition: public function Resolve()

Returns: string URL to resource

ResolveAll

Resolves an array of ResourceAttributes Calls ResourceAttribute::Resolve() for each and returns an array of resolved URLs

Definition: public static function ResolveAll($array_of_res_attr)

Returns: array An array of URLs to the resources

Parameters:

  • array $array_of_res_attr Resources to be resolved
Clone this wiki locally