tailieunhanh - Mastering Joomla! 1.5 Extension and Framework Development phần 8

. Nếu phần mở rộng một số lựa chọn phương pháp này, có một cơ hội mà sẽ có một cuộc xung đột đặt tên giữa các trường. Lựa chọn thứ hai là một lựa chọn tốt nếu dữ liệu thêm là tìm kiếm,Lưu người sử dụng cơ sở dữ liệu. Nếu updateOnly là đúng, | Chapter 11 Replacing We can use preg_replace to replace patterns with alternative text. This is often used for stripping out unwanted data. In this example we remove all digits. value preg_replace d value The first parameter is the pattern in this instance digits. The second parameter is the replacement string in this instance a null string. The final parameter is the subject. We can take advantage of blocks in the same way as we did with preg_match . Each matched block encapsulated in parentheses is assigned to a variable 1 through n. These variables are only accessible in the replacement parameter. pattern x d 4 D d 1 2 D d 1 2 replacement 1 2 3 value 1791-12-26 echo preg_replace pattern replacement value This example will output 1791 12 26 Access Control Joomla s access control mechanisms are not as clear cut as they could be this is due to an ongoing development cycle that is moving away from a legacy access control system. In the future Joomla will use a complete GACL Group Access Control Lists access control mechanism. The current access control mechanism uses an incomplete abstracted implementation of phpGACL. There are eleven user groups these groups are sometimes referred to as usertypes. Joomla also maintains a set of three legacy access groups Public Registered and Special. The legacy groups are stored in the _groups table theoretically this makes the legacy access groups dynamic. There is no mechanism for administrators to amend the legacy access groups and even if we manually add a new legacy access group to the groups table the effects are not globally reflected we should regard the legacy access groups as static. It is advisable not to make extensions dependent on the legacy access groups because they will probably be removed from Joomla at a later date. We should be most interested in the phpGACL groups simply called groups or user groups . Currently no mechanism is provided for administrators to amend these groups we can however take advantage of .

TỪ KHÓA LIÊN QUAN