This declares the class use and returns the correct name to use

@param Table $table
@param bool $fqcn
@return string
511961
public function getClassNameFromTable(Table $table, $fqcn = false)
    {
        $namespace = $table->getNamespace();
        $class = $table->getPhpName();

        return $this->declareClassNamespace($class, $namespace, true);
    }
1321082
public function generateClassName($table, $prefix=null, $suffix=null)
    {
        $tableString = '';
        $tableName = explode('_', $table);
        foreach ($tableName as $tableNameExploded) {
            $tableString .= ucfirst($tableNameExploded);
        }
        return ($prefix ? $prefix : '') . ucfirst($tableString) . 'Table' . ($suffix ? $suffix : '') . 'Seeder';
    }
279421
private function classExists($fqcn)
    {
        if (isset($this->classExists[$fqcn])) {
            return $this->classExists[$fqcn];
        }

        // final check, does this class exist?
        return $this->classExists[$fqcn] = class_exists($fqcn);
    }
1278055
public function initDbTable($table = null) {
		if (empty($table)) {
			return false;
		}

		$initModel = ClassRegistry::init(Inflector::classify($table), true);
		if ($initModel === false) {
			return false;
		}

		if (!method_exists($initModel, 'initDbTable')) {
			return false;
		}

		$ds = $initModel->getDataSource();
		if (!$ds->truncate($initModel)) {
			return false;
		}

		return $initModel->initDbTable();
	}
910922
public function getCreateTableSql($table)
    {
        $table = $this->buildRealTableName($table);
        return $this->getSchema()->getCreateTableSql($table);
    }
1104908
public static function fqcn(string $name): string
    {
        $type = str_replace('[]', '', $name);

        if (class_exists($type) || interface_exists($type) && '\\' !== $type[0]) {
            return '\\' . $name;
        }

        return $name;
    }
483758
protected function filterFullQualifyClassName($fqcn, callable $callback)
    {
        $parts = explode('\\', $fqcn);

        foreach ($parts as &$part) {
            $part = call_user_func($callback, $part);
        }

        return implode('\\', $parts);
    }
265859
public function findOneByBundleFQCN($fqcn)
    {
        $split = explode('\\', $fqcn);
        $dql = '
            SELECT p FROM Claroline\CoreBundle\Entity\Plugin p
            WHERE p.vendorName = :vendor
            AND p.bundleName = :bundle
        ';
        $query = $this->_em->createQuery($dql);
        $query->setParameter('vendor', $split[0]);
        $query->setParameter('bundle', $split[1]);
        $results = $query->getResult();

        return count($results) !== 0 ? $results[0] : null;
    }
1241593
public static function get_table_cfg(string $table, bool $force = false): ?array
  {
    // Check history is enabled and table's name correct
    if (
      ($db = self::_get_db()) &&
      ($dbc = self::_get_databases()) &&
      ($table = $db->tfn($table))
    ){
      if ( $force || !isset(self::$structures[$table]) ){
        self::$structures[$table] = [
          'history' => false,
          'primary' => false,
          'primary_type' => null,
          'primary_length' => 0,
          'auto_increment' => false,
          'id' => null,
          'fields' => []
        ];
        if (
          ($model = $dbc->modelize($table)) &&
          self::is_linked($table) &&
          isset($model['keys']['PRIMARY']) &&
          (\count($model['keys']['PRIMARY']['columns']) === 1) &&
          ($primary = $model['keys']['PRIMARY']['columns'][0]) &&
          !empty($model['fields'][$primary])
        ){
          // Looking for the config of the table
          self::$structures[$table]['history'] = 1;
          self::$structures[$table]['primary'] = $primary;
          self::$structures[$table]['primary_type'] = $model['fields'][$primary]['type'];
          self::$structures[$table]['primary_length'] = $model['fields'][$primary]['maxlength'];
          self::$structures[$table]['auto_increment'] = isset($model['fields'][$primary]['extra']) && ($model['fields'][$primary]['extra'] === 'auto_increment');
          self::$structures[$table]['id'] = $dbc->table_id($db->tsn($table), $db->current);
          self::$structures[$table]['fields'] = array_filter($model['fields'], function($a){
            return $a['id_option'] !== null;
          });
        }
      }
      // The table exists and has history
      if ( isset(self::$structures[$table]) && !empty(self::$structures[$table]['history']) ){
        return self::$structures[$table];
      }
    }
    return null;
	}
1194283
public function getFirstTableAlias($table=null)
    {
        if (!$table) {
            $table = static::getQuery()->get('table');
        }
        if ($table) {
            if (is_array($table)) {
                return static::getFirstTableAlias(current($table));
            }
            
            $table = preg_split('/(\,|(left|right)\s+join)/', $table)[0]; 
            $table = preg_split('/\s+(as\s+)?/', $table);
            $table = isset($table[1]) && $table[1] ? $table[1] : static::buildRealTableName($table[0], false); // 如果没有alias需要使用全名
            $table = trim($table);
        }
        
        return $table;
    }
92970
def _cls_fqn(self, cls):
        
        ns = self._namespace_stack[-1]
        if ns in ['__base__', None]:
            return cls.__name__
        else:
            return ns + '.' + cls.__name__
1201980
public function getCreateTable(string $table): string
	{
		return (string) $this->context->query('SHOW CREATE TABLE ' . $table)->fetch()->{'Create Table'};
	}
630359
def _machine_fqdn(machine):
    
    from acorn.logging.decoration import _fqdn
    if hasattr(machine, "__class__"):
        return _fqdn(machine.__class__, False)
    else: # pragma: no cover
        #See what FQDN can get out of the class instance.
        return _fqdn(machine)
312455
public static function getSingularForFqn(string $entityFqn): string
    {
        $shortName = self::getShortNameForFqn($entityFqn);
        $singular  = self::singularize($shortName);

        return lcfirst($singular);
    }
636867
public static function fqcnToBlockPrefix(string $fqcn): ?string
    {
        // Non-greedy ("+?") to match "type" suffix, if present
        if (preg_match('~([^\\\\]+?)(type)?$~i', $fqcn, $matches)) {
            return mb_strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $matches[1]));
        }

        return null;
    }
1106106
public function getCompiledFilenameFromClassname($fqcn)
    {
        $filename = $this->templateCompileDirectory.'/'.$fqcn.'.php';
        $filename = str_replace('\\', '/', $filename);

        return $filename;
    }
876098
public function getMapper($fqcn)
    {
        if (!isset($this->mappers[$fqcn])) {
            $this->mappers[$fqcn] = $this->createMapper($fqcn);
        }

        return $this->mappers[$fqcn];
    }