pimax / fb-messenger-php

Facebook Messenger Bot PHP API
GNU General Public License v2.0
314 stars 147 forks source link

Constructors question #132

Open jason-engage opened 6 years ago

jason-engage commented 6 years ago

Hey Fabian, what's your opinion on making constuctors?

At the moment, we have a series of parameters - and they are getting out of order.

Should a constructor just accept an array instead? Should that be how 2.0 works?

wittfabian commented 6 years ago

Very good question.

wittfabian commented 6 years ago

Should we tag the current status as a new version?

Yiidiir commented 6 years ago

@wittfabian I believe that we should rewrite the code, tbh an important thing to do is parsing the request array within the class and fetch the data accordingly. It's super messy and weird to use arrays with index 0 to access data etc..

arsengoian commented 6 years ago

Are you going to maintain compatibility in class constructors?

jason-engage commented 6 years ago

I wouldn't think so. Time consuming and complicated. Parameters would be the same but required within a key value array instead.

On Sun, Mar 4, 2018 at 3:25 AM Arsen Goian notifications@github.com wrote:

Are you going to maintain compatibility in class constructors?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pimax/fb-messenger-php/issues/132#issuecomment-370177171, or mute the thread https://github.com/notifications/unsubscribe-auth/AEP0mLey-sG7Tp29ylJ3EMLdkVyb5Xryks5tavwygaJpZM4SRQ-D .

--