I am using MSSQL and want to implement the WITH
function (as per Using ZF2, create a WITH statement?). To do so, I am extending the \Zend\Db\Sql\Select
class adding the properties and methods required to add the WITH
function. How do I now tell my application to use this Select class instead of the Zend one?
One approach is to specify an autoload
in my composer.json file:
"autoload": {
"psr-4": {
"Zend\\Db\\Sql\\": "vendor/rpk/Rpk/Zend/Db/Sql"
}
}
which will look in my vendor folder for any Sql
namespace stuff before looking in the zend folder, but this requires me to copy the entirety of the zend select class into my select class - this is undesirable as my class won't benefit from future patches to the zend branch.