Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4942

Set PHP struct generated field values as private with getters and setters

    XMLWordPrintableJSON

    Details

    • Patch Info:
      Patch Available

      Description

      The PHP autogenerated code currently keeps the struct derived class attributes public, and they have to be accessed like: $class->field.

      The java version keeps them private instead and uses getters and setters to access and mutate the data.

      A similar approach would be a better choice for most oop based php coding standards. 

      I've created a working patch, so if I get approval I will create a Pull request for this.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dedipyaman Dedipyaman Das
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0.5h
                  0.5h
                  Remaining:
                  Time Spent - 10m Remaining Estimate - 20m
                  20m
                  Logged:
                  Time Spent - 10m Remaining Estimate - 20m
                  10m