I thought convention made functions/methods beginning with an underscore "private" or at least internal, and so liable to change? Isn't this more likely to break in future because it's not "official API"?
How is this different to: echo image_path('/flash/charts/chart.swf');
What's the "true" for? Why is the extension separate from (what I assume is) the filename?
Comments on this snippet
Could you clarify a couple of things for me?
I thought convention made functions/methods beginning with an underscore "private" or at least internal, and so liable to change? Isn't this more likely to break in future because it's not "official API"?
How is this different to: echo image_path('/flash/charts/chart.swf');
What's the "true" for? Why is the extension separate from (what I assume is) the filename?
Hum
RTFS? (read the fucking source...)
Ok you can try opening the AssetHelper to read it
The true is to say "use absolute path" instead of image relative path.
and for question 1... what function/method begins with an _ ?
Romain,
I have changed the snippet ... first version of this snippet was:
_compute_public_path('charts', 'flash/charts', 'swf', true) or something ...
anyway now I know that I can use image_path for locating public paths to my directories under /web
cya