protected function mixin_methods_and_variables($class, $static) { $def = Library::lookup($class); foreach ($def->select(array('method', 'variable')) as $thing) { if ($thing instanceof Method) { $this->add_method($thing); } elseif ($thing instanceof Variable) { $this->add_variable($thing); } } }