Webiny\Component\Entity\Entity::getDatabase PHP Method

getDatabase() public method

Get entity database
public getDatabase ( ) : Mongo
return Webiny\Component\Mongo\Mongo
    public function getDatabase()
    {
        if (self::$database === null) {
            self::$database = self::mongo(self::getConfig()->Database);
        }
        return self::$database;
    }