class KalimahApps / Daleel / Config

Config

Handle config file.

Properties

private

$default_config array

Default config

Default: array
private static

$instance Config

Config instance

Default: null
private

$final_config array

Final config

Default: []
private

$current_version string

The current version the docs are being built for.

Current version

Default: ''

Methods

public

__construct ( ) : void

Load config file and merge with default config.

public

defineConfig ( array $config ) : void

Define user config.

Parameters

  • $config array
    Config array to merge with default config
public static

getInstance ( ) : Config

Get config instance.

private

updateConfig ( array $config ) : void

Update config.

Parameters

  • $config array
    Config array
private

updateFooter ( array $value ) : array

Merge footer array with copyright.

Parameters

  • $value array
    Footer array
public

updateVersionsConfig ( array $config , string $version ) : void

Update versions config.

Parameters

  • $config array
    Config array
  • $version string
    Version number
private

updateDefaultConfig ( $value ) : void

Update default config.

Parameters

  • $value string|array
    Config value to update
private

Update nested links like sidebar and navbar links.

Parameters

  • $array array
    Sidebar links
private

updateOutputPath ( $value ) : string

Update output path.

Parameters

  • $value string|array
    Path to output
private

updatePath ( $value ) : string

Convert path to absolute path.

Parameters

  • $value string|array
    Path to update
public

getConfig ( string $config_key ) : mixed

Get config value.

Parameters

  • $config_key string
    Config key
public

getSidebar ( ) : array

Get sidebar with updated links.

public

getNavbar ( ) : void

Get navbar with updated links.

public

setCurrentVersion ( string $value ) : void

Set the current version the docs are being built for.

Parameters

  • $value string
    Current version
public

getCurrentVersion ( ) : string

Get the current version the docs are being built for.