MantisBT - v4.0 Release (Planning)
View Issue Details
0000928v4.0 Release (Planning)Core Infrastructurepublic2011-08-21 07:512016-12-29 10:16
Reportercaseydk 
Assigned Tocaseydk 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version4.0Fixed in Version4.0 
Summary0000928: Fluent Interfaces for w2p_Database_Query
DescriptionRight now most of w2p_Database_Query's methods don't return anything.

Since we usually use a whole series of them in sequence, a fluent interface would make the entire process simpler *and* clearly group things together as a single process.
Additional InformationExample:

// Fluent interface
$myCar = new Car();
$myCar->setSpeed(100)->setColor('blue')->setDoors(5);
 
// Example without fluent interface
$myCar2 = new Car();
$myCar2->setSpeed(100);
$myCar2->setColor('blue');
$myCar2->setDoors(5);

Source: http://en.wikipedia.org/wiki/Fluent_interface
TagsNo tags attached.
Attached Files

Notes
(0002160)
w2p_user   
2011-08-24 01:11   
I dont think it would be helpful during debugging of issues in many ways going by what i see on wikipedia.


"This style is marginally beneficial in readability due to its ability to provide a more fluid feel to the code[citation needed].

However, it can be detrimental to debugging, as a fluent chain constitutes a single statement for which debuggers may not allow setting up intermediate breakpoints, for instance."
(0003655)
caseydk   
2014-10-04 22:11   
Resolved in v4.0 development
(0003834)
caseydk   
2016-12-29 10:16   

I'm changing this issue to acknowledged.

While it's resolved in the v4.0 development branch. That is going to be reviewed commit by commit and merged into a new development branch over the next couple months.

Issue History
2011-08-21 07:51caseydkNew Issue
2011-08-21 07:52caseydkStatusnew => assigned
2011-08-21 07:52caseydkAssigned To => bigbluehat
2011-08-24 01:11w2p_userNote Added: 0002160
2011-09-27 23:49caseydkProjectv3.0 Release => Pending Requests
2014-01-01 17:02caseydkProjectPending Requests => v4.0 Release (Planning)
2014-01-21 17:57caseydkTarget Version => 4.0
2014-03-30 22:12caseydkCategoryGeneral => Core Infrastructure
2014-08-16 22:36caseydkAssigned Tobigbluehat => caseydk
2014-10-04 22:11caseydkNote Added: 0003655
2014-10-04 22:11caseydkStatusassigned => resolved
2014-10-04 22:11caseydkFixed in Version => 4.0
2014-10-04 22:11caseydkResolutionopen => fixed
2016-12-29 10:16caseydkStatusresolved => acknowledged
2016-12-29 10:16caseydkNote Added: 0003834