TAILIEUCHUNG - Thiết kế mạng xã hội với PHP - 34

Tham khảo tài liệu 'thiết kế mạng xã hội với php - 34', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Groups If we are setting the first post our controllers can access this post object by calling the getFirstPost method and then calling the appropriate public methods on the post object. Return the object for the first post for setting fields return Object public function getFirstPost return this- post We have a number of setter methods as standard. Set the group this topic should be part of @param int group return void public function setGroup group this- group group Set the creator of the topic param int creator return void public function setCreator creator this- creator creator Set the name of the topic param String name return void public function setName name this- name name ------------------------------------ 312 ----------------------------------- Download from Wow eBook Chapter 10 We have our save method which if appropriate also saves the post once the topic has been created. Save the topic into the database return void public function save if this- id 0 update array update creator this- creator update name this- name update group this- group this- registry- getObject db - updateRecords topics update ID . this- id else insert array insert creator this- creator insert name this- name insert group this- group this- registry- getObject db - insertRecords topics insert this- id this- registry- getObject db - lastInsertID if this- includeFirstPost true this- post- setTopic this- id this- post- save Next we have a getter for the name property and also a toTags method which is now almost a standard for most of our models. Get the name of the topic public function getName return this- name ------------------------------------ 313 -------------------------------- Download from Wow eBook Groups Convert the topic data to template tags @param String prefix prefix for the template tags return void public function toTags prefix foreach this as field data if is_object data is_array data this- registry- getObject template - getPage - .

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.