php class that auto attaches .js and .css files, possible?
<p>I want the class to auto-attach its required css and js files when instantiated...</p>

<ol>
<li><p>is there any way of a class knowing where it is (and its files) in relation to the root?</p></li>
<li><p>if 1 is possible, is there a way to check if a css/js file has already been referenced in the file, or is this not necessary(do browsers ignore duplicate css/js file references)?</p></li>
</ol>
