简体   繁体   中英

Cakephp Html Helper Structure

Recently I have shifted from PHP OOPS to CakePHP. I am bit confused with the cakephp Html Helper structure.

Example:

  $this -> Html -> css();

In the above code, What does Html represents? Is it an object or variable, what class and object structure does cakephp maintains and how does it work?

I researched a lot but could not figure out the cakephp class/object structure. Please help!

here Html is Object of HtmlHelper class

and css is method of HtmlHelper class , calling by object of class

i am not sure 100% with my answer...and i also have tried but no documantion regarding this available on internet..

for some description please visit this link ... http://api.cakephp.org/2.5/class-HtmlHelper.html

  1. $this - Refer to Current Class means View Class ( http://api.cakephp.org/2.4/package-Cake.View.html )

  2. Html - Refer to HtmlHelper Class, This is done via HelperCollection Class, See the load Method ( http://api.cakephp.org/2.5/class-HelperCollection.html#_load )

  3. css() - Refer to method css() from HtmlHelper Class

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM