User Tools

Site Tools


tutorials:development:hello_world_page

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:development:hello_world_page [2010/07/22 21:38]
jonyo
tutorials:development:hello_world_page [2014/09/25 16:55] (current)
Line 15: Line 15:
 //file /addons/hello_world/info.php //file /addons/hello_world/info.php
  
-class addon_hello_world_info { +class addon_hello_world_info 
- var $name = 'hello_world'; +
- var $version = '1.0.0'; + public $name = 'hello_world'; 
- var $title = 'Hello World'; + public $version = '1.0.0'; 
- var $author = "Hello World, Inc."; + public $title = 'Hello World'; 
- var $description = 'Displays "Hello World" page.'; + public $author = "Hello World, Inc."; 
- var $auth_tag = 'my_addons'; + public $description = 'Displays "Hello World" page.'; 
- var $pages = array (+ public $auth_tag = 'my_addons'; 
 + public $pages = array (
  'hello_world_page'  'hello_world_page'
  );  );
Line 31: Line 32:
 //file: /addons/hello_world/pages.php //file: /addons/hello_world/pages.php
  
-class addon_hello_world_pages { +class addon_hello_world_pages 
- function hello_world_page(){+
 + public function hello_world_page () 
 + {
  //Note: The method name matches the page name used in the $pages var in info.php  //Note: The method name matches the page name used in the $pages var in info.php
  return "Hello World!";  return "Hello World!";
Line 57: Line 60:
 //Alternate, to display the entire page //Alternate, to display the entire page
  
-class addon_hello_world_pages { +class addon_hello_world_pages 
- function hello_world_page(){+
 + public function hello_world_page () 
 + {
  //Note: The method name matches the page name used in the $pages var in info.php  //Note: The method name matches the page name used in the $pages var in info.php
 ?> ?>
Line 100: Line 105:
  
 //extend our info class, so we can use $this-> to access vars in it //extend our info class, so we can use $this-> to access vars in it
-class addon_hello_world_pages extends addon_hello_world_info {+class addon_hello_world_pages extends addon_hello_world_info 
 +{
  
- function hello_world_page(){+ public function hello_world_page () 
 + {
  //Note: The method name matches the page name used in the $pages var in info.php  //Note: The method name matches the page name used in the $pages var in info.php
  //First, get instance of the view class  //First, get instance of the view class
tutorials/development/hello_world_page.1279834739.txt.gz · Last modified: 2014/09/25 16:55 (external edit)