public function getClassConfig($class, $key = null)
  {
    if (!is_string($class)) {
      $class = get_class($class);
      $class = substr($class, strrpos($class, '\\')+1);
    }
    return $this->config->getClassConfig($class, $key);
  }