/**
* Initialize a new instance of the {@link CategoryCollection} class.
*
* @param Gdn_SQLDriver|null $sql The database layer dependency.
* @param Gdn_Cache|null $cache The cache layer dependency.
*/
public function __construct(Gdn_SQLDriver $sql = null, Gdn_Cache $cache = null)
{
if ($sql === null) {
$sql = Gdn::sql();
}
$this->sql = $sql;
if ($cache === null) {
$cache = Gdn::cache();
}
$this->cache = $cache;
}