CodeIgniter cung cấp một CI_Controller đó có nghĩa là để được sử dụng làm cơ sở cho tất cả các bộ điều khiển của riêng bạn. Nó xử lý phía sau hậu trường làm việc của giao vars lớp và Loader để bạn có thể truy cập chúng. Bonfire mở rộng khái niệm này và cung cấp cho 4 Bộ điều khiển bổ sung có thể được sử dụng như là lớp cơ sở trong suốt dự án của bạn. Điều này giúp bạn tránh lặp lại quy tắc bất kỳ nhiều hơn cần thiết bằng cách cung cấp một vị trí trung tâm cho bất kỳ mã trang web rộng để ngồi. Ví dụ, nó làm cho một đối tượng người dùng có sẵn mà có thể được truy cập từ bất kỳ điều khiển, thư viện, hoặc xem để biết chi tiết về người dùng hiện tại. Bạn có thể sử dụng nó để thiết lập một chủ đề tùy chỉnh cho tất cả các trang công cộng của bạn. Và nhiều hơn nữa. Mỗi bộ điều khiển được lưu trữ trong tập tin riêng của mình trong ứng dụng / thư viện thư mục và tập tin được đặt tên giống như tên lớp. Điều này cho phép nạp đạn tự động được cung cấp để dễ dàng tìm thấy các lớp cơ sở của bạn. Các tập tin MY_Controller hiện chưa được sử dụng bởi Bonfire và còn lại một mình để bạn có thể sử dụng nó cho nhu cầu riêng của bạn.
đang được dịch, vui lòng đợi..