4. OverView of Drupal CMS
Basically, there are 5 main layers in Drupal where information flows,
- Data (Node, ETC)
- Modules
- Blocks and Menus
- User Permissions
- Template
Data - Base of the system is collection of Nodes. – the data pool
Modules -These are functional plugins that are either part of the Drupal core (they ship with Drupal) or they are contributed items that have been created by members of the Drupal community.
Blocks and Menus - This is the next layer where we find blocks and menus. Blocks often provide the output from a module or can be created to display whatever you want, and then can be placed in various spots in your template (theme) layout. Blocks can be configured to output in various ways, as well as only showing on certain defined pages, or only for certain defined users.
User Permissions - Here is the next layer where settings are configured to determine what different kinds of users are allow to work and see.
Template - This is mainly the site theme or the skin. This is made up predominantly of XHTML and CSS, with some PHP variables intermixed.
5. What are the two new error levels introduced in PHP5.3?
E_DEPRECATED - The E_DEPRECATED error level is used to indicate that a function or feature has been deprecated.
E_USER_DEPRECATED - The E_USER_DEPRECATED level is intended for indicating deprecated features in user code, similarly to the E_USER_ERROR and E_USER_WARNING levels.
5. Explain Late Static binding.
02 | public function who() { |
05 | public function test() { |
11 | public function who() { |
Out put of the above snippet is? B This is mainly because we have the object instance named as $this is for the class B, though the function is instantiated inside class A. But, If you need the expected output which is “A”, we can call them statically as follows
02 | public static function who() { |
05 | public static function test() { |
11 | public static function who() { |
Out put -> A
Main limitation of self:: or __CLASS__ are resolved using the class in which the function belongs, as in where it was defined. By introducing late static binding this limitation has been resolved as follows,
02 | public static function who() { |
05 | public static function test() { |
11 | public static function who() { |
Out put -> B