TAILIEUCHUNG - Embedding Perl in HTML with Mason Chapter 4: APIs- P1

Tham khảo tài liệu 'embedding perl in html with mason chapter 4: apis- p1', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 4 APIs- P1 Mason is more than just a templating system. It provides a framework for translating requests into This framework has a number of class object APIs worth knowing about. You certainly won t need to use most of these methods very often but you will probably want to use at least some of them in many of your Mason-based projects. This chapter documents those APIs. For a more concise reference to these methods see Appendix B. Request Class and Object API The request object in Mason represents the context of the current request process. For example it knows where in the component wrapping chain it is what arguments have been passed to various component calls if you ve been bad or good and so on. It also allows you to change that context in various ways such as by calling another component or aborting the request. The request API provides access to some of the most frequently used Mason features particularly those relating to component calls autohandlers and aborting in the middle of a request. Recall as first mentioned in Chapter 2 that the Mason request object is available in all components as m. The request class has only two class methods. The first HTML Mason Request- new is intended for use by other Mason objects and is not documented for external use. If you want to make a new request object use the make_subrequest method provided by the request object which is covered as part of the discussion of Mason s subrequest mechanism in Chapter 5. The second class method HTML Mason Request- instance returns the current Mason request object. This is useful if you have code outside of a Mason component that needs to access the request object. Inside components you can just use m. The request object s methods can be grouped together into several functional areas. Constructor Parameters A number of parameters can be set when creating a new request object. You will most often set these by passing them to the ApacheHandler s constructor or by setting

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.