<?php

namespace Api\PhpServices\XhProfiler;

use Api\PhpUtils\Mongo\MongoBase;

class XhMongo extends MongoBase
{
    private $domian ;
    public function __construct($domain)
    {
        $this->domian = $domain;
    }

    protected function getConfigIndex()
    {
        //需要在yaconf 配置 mongo
        return 'xhprof';
    }

    protected function getDatabaseName()
    {
        return 'xhprof';
    }

    protected function getCollectionName()
    {
        // 根据 domain 来生成对应的collection
        return $this->domian.'_'.'xhprof';
    }
}