Zend Framework headScript()->setfile(…)

I just hate ZF documentations, there is a lot of talk about nothing and usually the most important stuff, that you are looking for is missing.

So i was wondering how headScript() works. First I’ve tried to find definition in ZF libraries, unsuccessfully.
There is no defined functions such as appendFile or setFile, basically any of these listed here.
So after a while I’ve found out, that definition for these functions just don’t exist at all.
They are called via __call() in Zend/View/Helper/HeadScript.php and some other additional helping functions.
Strange but whatever. But at least i’ve find out, how are they called.
On my surprise, there is any note about what these functions are doing. ZF is usually well documented at least in files, when online documentation sucks.
So my final attempt was just to try use this function. Maybe this sounds like the easiest way to go, but starting with this, you will never find out what is actually happening under the hood.

anyway, what is actually setfile() doing ?
it clears all defined header script files and define specified script.

damn ZF documentation ….

2 thoughts on “Zend Framework headScript()->setfile(…)

Leave a Reply