Advertisement
djthoms

Untitled

Jun 23rd, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. class Foo {
  2.  
  3.     public $settings, $options;
  4.    
  5.     public function __construct() {
  6.         $this->settings = array(
  7.             'distro'    => '',
  8.             'pkg_mgr'   => '',
  9.             'options'   => array(1, 2, 3)
  10.         );
  11.     }
  12.  
  13.     public function get_options() {
  14.         $options = $this->settings['options'];
  15.         foreach($options as $v) {
  16.             $this->options[] = $v;
  17.         }
  18.         return $this->options;
  19.     }
  20.  
  21. }
  22.  
  23. $foo = new Foo();
  24. print_r($foo->get_options());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement