protected function getClassComponentNamespace($class_name) {
    $pieces = explode('\\', $class_name);

    if (!isset($pieces[1])) {
      // We don't know about something that is in the global namespace.
      return '';
    }

    if ($pieces[1] == 'Core' || $pieces[1] == 'Component') {
      return implode('\\', array_slice($pieces, 0, 3));
    }
    else {
      return implode('\\', array_slice($pieces, 0, 2));
    }
  }