Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flipped TerminusCollection; defaults to fetchless; added APICollection #1779

Merged
merged 5 commits into from
Oct 11, 2017

Conversation

TeslaDethray
Copy link
Contributor

@TeslaDethray TeslaDethray commented Oct 3, 2017

This changes how TerminusCollection works in these ways:

  • TerminusCollection no longer contains API-accessing functions. Those have been moved into APICollection.
  • TerminusCollection now has getData and setData functions.
  • Models are populated with the stored data.
  • Added reset() function. Collection filtering can now be reversed with reset() (which sets the models to null again which will require another fetch upon model retrieval using the saved data).
  • APICollection retrieves data and stores with setData.
  • Removed redundant getCollectionData() and getMembers()
  • Removed options param from fetch
  • Removed listing function from TerminusCollection

Other changes:

  • Removed some redundant functions
  • Removed Loadbalancer(s) model & collection - nothing in Terminus uses them anymore.

@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 3, 2017
@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 3, 2017
@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 3, 2017
@TeslaDethray TeslaDethray force-pushed the flip-fetchless branch 4 times, most recently from 3e642c5 to 3946354 Compare October 9, 2017 21:44
@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 9, 2017
@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 9, 2017
@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 9, 2017
@TeslaDethray TeslaDethray force-pushed the flip-fetchless branch 2 times, most recently from 2b19e3c to 179c07e Compare October 9, 2017 23:09
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 93.803% when pulling a1eb69f on flip-fetchless into 37d8ff3 on master.

@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 10, 2017
@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 10, 2017
@TeslaDethray TeslaDethray force-pushed the flip-fetchless branch 3 times, most recently from e2874bc to f074f57 Compare October 11, 2017 19:57
@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 94.401% when pulling b35cfa9 on flip-fetchless into 37d8ff3 on master.

$tokens = [];
foreach ($this->getDataStore()->keys() as $key) {
$tokens[] = (object)$this->getDataStore()->get($key);
if (empty(parent::getData())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is triggering my php alarms, but I guess it's no longer a problem since we don't support older versions of php. Old instincts die hard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I was using $this->data, but then I fought it: "Do you want to change every instance of it if you start doing something else with the data?" While I couldn't decide what might change, I figured I ought to encapsulate against the future anyway.

Copy link
Contributor

@ronan ronan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 👌 👌 +1

@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 11, 2017
@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 11, 2017
@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 11, 2017
@pantheon-systems pantheon-systems deleted a comment from coveralls Oct 11, 2017
@TeslaDethray TeslaDethray merged commit 7d77ac0 into master Oct 11, 2017
@TeslaDethray TeslaDethray deleted the flip-fetchless branch October 11, 2017 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants