Currently, the $where parameter in AbstractTableGateway::select, AbstractTableGateway::update, and AbstractTableGateway::delete will accept Closures, but not invokable classes. It would be nice if it were possible expand the allowed parameters types to include invokable classes.
The following code should allow it. I was hoping to replace with is_callable($where), but that would return true for cases where $where couldn't be executed using $where($select);, e..g [ new\DateTime, 'format'].
Currently, the
$where
parameter inAbstractTableGateway::select
,AbstractTableGateway::update
, andAbstractTableGateway::delete
will accept Closures, but not invokable classes. It would be nice if it were possible expand the allowed parameters types to include invokable classes.The following code should allow it. I was hoping to replace with
is_callable($where)
, but that would returntrue
for cases where$where
couldn't be executed using$where($select);
, e..g[ new\DateTime, 'format']
.