Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo {
- public $settings, $options;
- public function __construct() {
- $this->settings = array(
- 'distro' => '',
- 'pkg_mgr' => '',
- 'options' => array(1, 2, 3)
- );
- }
- public function get_options() {
- $options = $this->settings['options'];
- foreach($options as $v) {
- $this->options[] = $v;
- }
- return $this->options;
- }
- }
- $foo = new Foo();
- print_r($foo->get_options());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement