mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-4942 Set PHP struct generated field values as private with getters and setters
Client: php Patch: Das Dedipyaman This closes #2245 Update field access for getters_setters flag. FFields are private if getters_setters are set, otherwise, public.
This commit is contained in:
parent
c553155af8
commit
6fd830d690
@ -939,7 +939,8 @@ void t_php_generator::generate_php_struct_definition(ostream& out,
|
||||
dval = render_const_value((*m_iter)->get_type(), (*m_iter)->get_value());
|
||||
}
|
||||
generate_php_doc(out, *m_iter);
|
||||
indent(out) << "public $" << (*m_iter)->get_name() << " = " << dval << ";" << endl;
|
||||
string access = (getters_setters_) ? "private" : "public";
|
||||
indent(out) << access << " $" << (*m_iter)->get_name() << " = " << dval << ";" << endl;
|
||||
}
|
||||
|
||||
out << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user