This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* class pertama | |
| */ | |
| class ClassSaya { | |
| //...properties | |
| public $prop1 = 'Saya properti pertama!'; | |
| /* method __construct | |
| */ | |
| public function __construct() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* class pertama | |
| */ | |
| class ClassSaya { | |
| public $prop1 = 'Saya properti pertama!'; | |
| /* method __construct | |
| */ | |
| public function __construct() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* class pertama | |
| */ | |
| class ClassSaya { | |
| public $prop1 = 'Saya properti pertama!'; | |
| /* method __construct | |
| */ | |
| public function __construct() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* class pertama | |
| */ | |
| class ClassSaya { | |
| //...properties | |
| public $prop1 = 'Saya properti pertama!'; | |
| /* method __construct | |
| */ | |
| public function __construct() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class ClassSaya { | |
| public $prop1 = 'Saya properti pertama!'; | |
| /* method memberi nilai baru pada properties | |
| */ | |
| public function setProperty ($newval) { | |
| $this->prop1 = $newval; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class ClassSaya { | |
| //...properties | |
| public $prop1 = 'Saya properties pertama.'; | |
| } | |
| /* instansiasi class menjadi object | |
| */ | |
| $object = new ClassSaya; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $object = new ClassSaya; | |
| var_dump($object); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $object = new ClassSaya; //...instansiasi class menjadi object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* structure class | |
| */ | |
| class ClassSaya { | |
| //...definisikan properties dan method disini | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function index() { | |
| // $this->load->view('welcome_message'); | |
| $this->load->view('view_saya'); | |
| } |