class Package (View source)

Constants

DESCRIPTION

SOURCE

TIME

TYPE

URL

VERSION

META_DIR

META_FILE

Methods

__construct(string $composerLock)

Open Composer lock file (eg.: composer.lock)

static string|null
info(string $name, int $type, bool $dev = false)

Get package info

cache()

Caches metadata from composer.lock

bool
clear()

Clear metadata cache

Details

__construct(string $composerLock)

Open Composer lock file (eg.: composer.lock)

Parameters

string $composerLock

Exceptions

Exception

static string|null info(string $name, int $type, bool $dev = false)

Get package info

Parameters

string $name

Set /

int $type

Set info by constant:

  • DESCRIPTION
  • SOURCE
  • TIME
  • TYPE
  • URL
  • VERSION
bool $dev

Set true for get from packages-dev

Return Value

string|null

cache()

Caches metadata from composer.lock

Exceptions

Exception

bool clear()

Clear metadata cache

Return Value

bool