Composer API
Class

Composer\Json\JsonManipulator

class JsonManipulator

Methods

__construct($contents)

getContents()

addLink($type, $package, $constraint, $sortPackages = false)

addRepository($name, $config)

removeRepository($name)

addConfigSetting($name, $value)

removeConfigSetting($name)

addProperty($name, $value)

removeProperty($name)

addSubNode($mainNode, $name, $value)

removeSubNode($mainNode, $name)

addMainKey($key, $content)

removeMainKey($key)

format($data, $depth)

Details

at line 36
public __construct($contents)

Parameters

$contents

at line 50
public getContents()

Parameters

$type
$package
$constraint
$sortPackages

at line 148
public addRepository($name, $config)

Parameters

$name
$config

at line 153
public removeRepository($name)

Parameters

$name

at line 158
public addConfigSetting($name, $value)

Parameters

$name
$value

at line 163
public removeConfigSetting($name)

Parameters

$name

at line 168
public addProperty($name, $value)

Parameters

$name
$value

at line 177
public removeProperty($name)

Parameters

$name

at line 186
public addSubNode($mainNode, $name, $value)

Parameters

$mainNode
$name
$value

at line 280
public removeSubNode($mainNode, $name)

Parameters

$mainNode
$name

at line 376
public addMainKey($key, $content)

Parameters

$key
$content

at line 416
public removeMainKey($key)

Parameters

$key

at line 449
public format($data, $depth)

Parameters

$data
$depth