Skip to content

Hydrahon v1.1.9

Compare
Choose a tag to compare
@mario-deluna mario-deluna released this 05 Nov 13:11
· 54 commits to master since this release

Fixed custom select query object inheritance.

The Select class is now able to fully inherit its properties from a parent select class.

Example:

class BurgerQuery extends ClanCats\Hydrahon\Query\Sql\Select
{
    public function onlyTastyOnes()
    {
        $this->where('tasty', 1);
    }
}

$query = new BurgerQuery(
    $h->table('burgers')->select()->limit(50)
);

$query->onlyTastyOnes();

$tastyBurgers = $query->get();