Set schemaName w/ proxy.

@param string $schemaName

@return PageSeo
346913
public function setSchemaName($schemaName, $locale = null)
    {
        $this->translate($locale, false)->setSchemaName($schemaName);
        $this->mergeNewTranslations();

        return $this;
    }
1091408
private function generatorClassEntityTable($schemaName, $tableName) {
        $template_model_table = file_get_contents(dirname(__FILE__) . DS . 'Model' . DS . 'Src_Module_Model_Table.tpl');
        $templateModelTableSchema = str_replace("%SchemaClass%", $this->toCamelCase($schemaName), str_replace("%SchemaName%", $schemaName, $template_model_table));
        $templateModelTable = str_replace("%TableClass%", $this->toCamelCase($tableName), str_replace("%TableName%", $tableName, $templateModelTableSchema));
        file_put_contents($this->ormFolder . $this->toCamelCase($schemaName) . DS . 'Tables' . DS . $this->toCamelCase($tableName) . 'Table.php', $templateModelTable);
        chmod($this->ormFolder . $this->toCamelCase($schemaName) . DS . 'Tables' . DS . $this->toCamelCase($tableName) . 'Table.php', 0644);

        return $this;
    }
1176252
public static function getTablesNames(string $schemaName): array
  {
    $sql = sprintf("
select TABLE_NAME as table_name
from   information_schema.TABLES
where  TABLE_SCHEMA = %s
and    TABLE_TYPE   = 'BASE TABLE'
order by TABLE_NAME", self::$dl->quoteString($schemaName));

    return self::$dl->executeRows($sql);
  }
575234
protected function getSchema($connectionName = null)
    {
        $connectionName = $connectionName === null ? $this->connectionName : $connectionName;

        /** @var \Doctrine\DBAL\Schema\AbstractSchemaManager $schema */
        $schema = app('db')->connection($connectionName)->getDoctrineSchemaManager();
        // For MySQL
        $schema->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
        // For Sqlite
        $schema->getDatabasePlatform()->registerDoctrineTypeMapping('long', 'integer');
        $schema->getDatabasePlatform()->registerDoctrineTypeMapping('bit', 'boolean');

        return $schema;
    }
1251249
public static function fromClass($className)
    {
        return new self(
            \Pheasant::instance()->schema($className),
            \Pheasant::instance()->finderFor($className)
        );
    }
902052
public function hasSchema($schemaName)
    {
        $sql = \sprintf(
            "SELECT count(*)
             FROM pg_namespace
             WHERE nspname = '%s'",
            $schemaName
        );
        $result = $this->fetchRow($sql);

        return $result['count'] > 0;
    }
345943
public function getForeignKey($constraintName)
    {
        $constraintName = $this->normalizeIdentifier($constraintName);
        if (! $this->hasForeignKey($constraintName)) {
            throw SchemaException::foreignKeyDoesNotExist($constraintName, $this->_name);
        }

        return $this->_fkConstraints[$constraintName];
    }
123881
public function setSchemaByName($schema_name = null)
    {
        if (! $schema_name) {
            $schema_name = $this->namespace;
        }
        if (strpos($schema_name, '.') === false) {
            $schema_name = (String) $this->db . '.' . $schema_name;
        }

        // Check formats
        if ($this->client->schema_format === 'php') {
            $schema_file = $this->client->schema_dir . '/' . $schema_name . '.php';
            if (file_exists($schema_file)) {
                $schema = include $schema_file;
                if (! is_array($schema)) {
                    throw new \Exception('Possible PHP syntax error in ' . $schema_file);
                }
            }
        } elseif ($this->client->schema_format === 'json') {
            $schema_file = $this->client->schema_dir . '/' . $schema_name . '.json';
            if (file_exists($schema_file)) {
                $json_string = file_get_contents($schema_file);
                $schema = json_decode($json_string, true);
                if (empty($schema)) {
                    throw new \Exception('Possible JSON parse error in ' . $schema_file);
                }
            }
        } else {
            throw new \Exception('Unknown schema format: ' . $this->client->schema_format);
        }

        // Assign Schema
        if (! empty($schema)) {
            $this->setSchema($schema);
        }

    }
1270638
public function updateBundleSchema($bundleName)
    {
        if (null === $bundle = $this->_application->getBundle($bundleName)) {
            return;
        }

        try {
            $schemaTool = new SchemaTool($bundle->getEntityManager());
            $classes = $this->getBundleSchema($bundle);
            $schemaTool->updateSchema($classes, true);
            unset($schemaTool);
        } catch (\Exception $e) {}
    }
27417
protected function mergeIncludedSchemas($schemaName)
    {
        $include = ['include' => [], 'include_default' => []];

        foreach (array_keys($include) as $key) {
            if (isset($this->schemas[$this->schemaFolder][$schemaName][$key])) {
                $include[$key] = $this->schemas[$this->schemaFolder][$schemaName][$key];
                $include[$key] = is_array($include[$key]) ? $include[$key] : [$include[$key]];
            }
        }

        foreach ($include['include'] as $schema) {
            $this->parseAll($schema);
            $this->schemas[$this->schemaFolder][$schemaName]['objects'] = array_merge(
                $this->schemas[$this->schemaFolder][$schemaName]['objects'],
                $this->schemas[$this->schemaFolder][$schema]['objects']
            );
        }

        $folder = $this->schemaFolder;
        $this->schemaFolder = $this->defaultSchemaFolder;
        foreach ($include['include_default'] as $schema) {
            $this->parseAll($schema);
            $this->schemas[$folder][$schemaName]['objects'] = array_merge(
                $this->schemas[$folder][$schemaName]['objects'],
                $this->schemas[$this->schemaFolder][$schema]['objects']
            );
        }
        $this->schemaFolder = $folder;
    }
909041
protected function tableName(string $schemaName, string $typeName): string
    {
        return implode('_', [$this->prefix, $schemaName, $typeName]);
    }
947720
public static function fromQName( $name )
	{
		if ( $name instanceof QName )
		{
			$name = "{$name->prefix}:{$name->localName}";
		}
		if ( ! is_string( $name ) )
		{
			throw new \InvalidArgumentException( "$name must be string or a QName instanxe" );
		}

		$types = SchemaTypes::getInstance();
		$attribute = $types->getElement( $name );

		if ( ! $attribute )
		{
			return null;
		}

		$result = new DOMSchemaAttribute();
		error_log( __CLASS__ . " need to populate the DOMSchemaAttribute instance" );
		return $result;
	}
1074668
public function getGlobalType( $qualifiedName )
	{
		if ( isset( $this->schemaTypeCache[ $qualifiedName->__toString() ] ) )
		{
			return $this->schemaTypeCache[ $qualifiedName->__toString() ];
		}

		$schemaType = DOMSchemaType::fromSchemaType( $qualifiedName );
		return $schemaType;
	}
968797
public function setClassName(string $className): ClassPaser
    {
        $this->className = $className;
        $this->reflect_object = (new \ReflectionClass($this->className));

        return $this;
    }
41069
public function addColumnName($columnName)
    {
        if (!is_string($columnName) || (strlen($columnName) <= 0)) {
            throw SchemaException::invalidIndexColumnName($this->getName());
        }

        $this->columnNames[] = $columnName;
    }
1099385
public static function fromSchemaType( $qname )
	{
		$types = SchemaTypes::getInstance();
		$type = $types->getType( "{$qname->prefix}:{$qname->localName}" );

		if ( ! $type ) return null;

		$datatype = new DOMSchemaDatatype( "{$qname->prefix}:{$qname->localName}" );
		$result = new DOMSchemaSimpleType( $qname, $datatype );
		return $result;
	}
741275
public function bind($typeName)
	{
		if($this->proxyTypes !== NULL)
		{
			$this->proxyTypes = NULL;
		}
		
		$key = strtolower($typeName);
		
		switch($key)
		{
			case 'koolkode\config\configuration':
			case 'koolkode\context\containerinterface':
			case 'koolkode\context\exposedcontainerinterface':
			case 'koolkode\context\scope\scopedcontainerinterface':
				throw new \InvalidArgumentException(sprintf('Binding %s is forbidden', $typeName));
		}
		
		if(isset($this->bindings[$key]))
		{
			return $this->bindings[$key];
		}
		
		return $this->bindings[$key] = new Binding($typeName);
	}