public function setDAO(string $class, DAO $dao = null)
    {
        if (!is_subclass_of($class, Model::class))
            throw new DAOException("$class is not a valid Model");

        $this->dao[$class] = $dao;
        return $this;
    }
public function setDAO(string $class, DAO $dao = null)
    {
        if (!is_subclass_of($class, Model::class))
            throw new DAOException("$class is not a valid Model");

        $this->dao[$class] = $dao;
        return $this;
    }
public function setDAO ( string $ class , DAO $ dao = null ) { if ( ! is_subclass_of ( $ class , Model :: class ) ) throw new DAOException ( "$class is not a valid Model" ) ; $ this -> dao [ $ class ] = $ dao ; return $ this ; }
Set the DAO for a model manually.
@param string $class The name of the Model class
@param DAO $dao The DAO to set. Omit to reset - a new one will be instantiated on request
@return DB Provides fluent interface
Set the DAO for a model manually .