Công nghệ thông tin
Kinh nghiệm-thủ thuật
HTML Output Class Redefined | HTML Output Class Redefined |
|
|
|
| Thứ sáu, 23 Tháng một 2007 | ||||
Page 1 of 2 IntroductionNot long ago, I got tired of passing certain common variables to every output function. So I decided to incorporate them into my output class instead. If you're familiar with the general layout of a typical output class, then what I'm about to present should make a lot of sense. I hope these examples will help you out along the way as you continue to contribute to the Mambo open source community.
The Old Way Let's take a look at how the typical output class works. Normally, we call a function that collects the data we want displayed to the user. Then we call an HTML output class function to display the data. The LogicHere's a typical logic function. Notice how many variables are passed to the output function. In many cases, we always pass a few of the same variables to our output class. And each time we create a new output function, we have to remember to pass those same variables. function myFunction( $id, $option, $task, $Itemid ) { The Output Here's a typical output class. And there's those pesky common variables again. They're the same for just about every output function we write. And they're a pain to keep up with if we have multiple output functions. <?phpA New Way Have you ever spent time debugging your code only to discover you left out one of those common variables? Or maybe it was in the wrong order in the function parameter list and all kinds of strange things happened in your output. Enter a new HTML output class. We'll be adding some new features that will help you keep those common variables straight. Click the link below to continue your journey. Newer news items:
Older news items:
|
||||
| Từ điển thuật ngữ |
| Liên kết Webs |
| Album ảnh |
| Why's luyenkim.net |
| Woman Calendar |
| Cà phê chiều thứ 7 |
| Từ điển LạcViệt Online |
| Kulkul's world |
| www.xahoihoctap.net |