Functions
installRoot
public function installRoot(
UrlPath $path null
): UrlPath

Gets or sets the path and URL of the system install root directory.

Parameters
path
UrlPath$

UrlPath representing the path and URL

Returns

UrlPath containing the path and URL

userData
public function userData(
UrlPath $path null
): UrlPath

Gets or sets the path and URL of the system userdata directory.

Parameters
path
UrlPath$

UrlPath representing the path and URL

Returns

UrlPath containing the path and URL

blogRegistry
public function blogRegistry(): array

Gets the mapping of registered blogIDs to url and path.

Returns

Array mapping blogIDs to  UrlPath objects containing the path and URL

registerBlog
public function registerBlog(
string $blogid,
UrlPath $path
)

Register a blog ID, path, and URL with the system

Parameters
blogid
string$

string continaing the blog identifier

path
UrlPath$

UrlPath with the path and URL of the blog

unregisterBlog
public function unregisterBlog(
string $blogid
)

Remove the registration for a blog.

Parameters
blogid
string$

string continaing the blog identifier

writeConfig
public function writeConfig()

Writes out the configuration file used to record the URLs and paths.

configExists
public function configExists()

Checks if a path config has been written yet.

Returns

True if the install-wide pathconfig.php exists, false otherwise.

definePathConstants
public function definePathConstants(
string $blog_dir ''
)

Defines the INSTALL_ROOT, INSTALL_ROOT_URL, USER_DATA_PATH, and optionally BLOG_ROOT and BLOG_ROOT_URL legacy constants.  These constants are deprecared, but are still used by a lot of existing code, and so aren't going away yet.