Makes a self copy with the same dependencies instances but with another table prefix.

@param string $prefix Table prefix
@return static
333853
public function withTablePrefix(string $prefix): self
    {
        return new static($this->connection, $this->grammar, new TablePrefixer($prefix));
    }
289605
public function setNodeNsPrefix($prefix)
	{
		if (is_string($prefix) && strlen($prefix))
		{
			$this->nodeNsPrefix = rtrim($prefix, ':') . ':';
		}
		else
		{			
			$this->nodeNsPrefix = '';
		}
		
		return $this;
	}
399654
public static function prefix($prefix = '') {
        $that = self::driver();
        $that->prefix($prefix);
        if (empty($prefix)) {
            return $that->config['prefix'];
        }
        $that->config['prefix'] = $prefix;
    }
331949
protected static function getWithPrefix($table)
    {
        $prefix = static::$prefix;

        if (is_null($prefix) || empty($prefix)) {
            // If prefix is null, then no need to prepend a redundant _
            return $table;
        }

        return sprintf('%s_%s', $prefix, $table);
    }
1235060
public function getNamespaceForPrefix( $prefix )
	{
		if ( ! isset( $this->instance_namespaces[ $prefix ] ) ) return null;
		return $this->instance_namespaces[ $prefix ];
	}
970445
public function setPrefix($prefix)
    {
        $prefix = "/" . ltrim($prefix, "/");
        $routes = [];
        foreach ($this->routes as $route)
            $routes[] = $route->setPattern(rtrim($prefix . $route->getPattern(), "/"));
        $this->routes = $routes;
        return $this;
    }
1302421
public function set_prefix( $prefix ) {
		if ( ! Str::starts_with( $prefix, '/' ) || Str::ends_with( $prefix, '/' ) ) {
			throw new MalformedRouteException;
		}

		$this->prefix = $prefix;

		return $this;
	}
458503
public function prefix($prefix = null)
	{
		if (null !== $prefix)
		{
			$this->prefix = $prefix;
		}
		return $this->prefix;
	}
13602
function stripPrefix($prefix)
    {
        $key = (string) $this;

        if (substr($key, 0, strlen($prefix)) == $prefix)
            $key = substr($key, strlen($prefix));

        return new self($key);
    }
1120335
public function from($table, string $alias = null): self
    {
        return $this->table($table, $alias);
    }
608381
public function setPrefix($prefix)
    {
        $this->prefix = $prefix;
        $this->identifier = $this->prefix.$this->key;

        return $this;
    }
238929
public function prefix($prefix, $callback)
    {
        $partial = new self($this->get($prefix));

        // We will pass the newly created "partial" Configuration object to the
        // callback so that it can be used within the given prefix.
        $callback($partial);

        // We want to make sure that any changes made to the prefixed object are
        // reflected in this object, so we will swap it with the partial.
        $this->set($prefix, $partial->all());

        unset($partial);
    }
1128460
public function from($table, $alias = null)
    {
        if ($table) {
            if (!$this->_model && strpos($table, '\\') !== false) {
                $this->_model = $this->_di->getShared($table);
            }

            $this->_tables = $alias ? [$alias => $table] : [$table];

            if ($table instanceof self) {
                $this->_db = $table->_db;
            }
        }

        return $this;
    }
1055311
public function table($table = '', $tablePrefix = null)
    {
        $hasAlias = is_array($table) ? true : false;
        is_null($tablePrefix) && $tablePrefix = $this->tablePrefix;
        $tableName = $tablePrefix . ($hasAlias ? key($table) : $table);

        $this->table[count($this->table) . '_' . $tableName] = $hasAlias ? current($table) : null;
        return $this;
    }
871533
public function setTitle($prefix)
    {
        $this->addHook(function($document) use ($prefix) {
            $title = $document->getTitle();

            if ($title) {
                $title = $prefix . ' - ' . $title;
            } else {
                $title = $prefix;
            }

            $document->addHeaderNode(new RawNode('<title>'.htmlspecialchars($title).'</title>'));
        });

        return $this;
    }
611196
public static function from($file, $prefix = 'php-tmp-file')
    {
        $tmpFile = static::generate($prefix);

        copy($file, $tmpFile);

        return $tmpFile;
    }
620680
public static function lookupNamespace($prefix)
    {
        return isset(self::$_namespaces[$prefix]) ?
            self::$_namespaces[$prefix] :
            $prefix;
    }