Class CriticalI_ChangeManager_Planner

Description

A Planner is used to construct a CriticalI_ChangeManager_Plan for making changes to a repository or project.

Located in /Core/lib/CriticalI/ChangeManager/Planner.php (line 39)


	
			
Direct descendents
Class Description
 class CriticalI_ChangeManager_RepositoryPlanner A CriticalI_ChangeManager_Planner specifically for planning changes to
 class CriticalI_Project_ChangePlanner A CriticalI_ChangeManager_Planner specifically for planning changes to
Variable Summary
Method Summary
 CriticalI_ChangeManager_Planner __construct ( $sourceList,  $installedList,  $allowMultipleVersions)
 CriticalI_ChangeManager_Plan eval_requirements (CriticalI_ChangeManager_Plan $plan, boolean $evalDepends, [boolean $upgrade = false])
 CriticalI_ChangeManager_Plan eval_upgrade (CriticalI_ChangeManager_Plan $plan, array $packages, array $versions, boolean $evalDepends)
 CriticalI_Package_Version installed_package_instance (string $package, string $version)
 CriticalI_ChangeManager_Plan install_plan (mixed $packageName, [mixed $version = null], [boolean $evalDepends = true])
 boolean is_exact_or_newer_version_installed ( $pkg, [ $plan = null])
 boolean is_exact_version_installed ( $pkg, [ $plan = null])
 boolean is_installed ( $pkg, [ $plan = null])
 string make_install_specification (string $version)
 void mark_upgradable ( $pkg)
 array matching_versions (string $package, string $version)
 void normalize_package_args ( &$packageName,  &$version, mixed $packageName, mixed $version)
 void remove_closest ( $pkg,  $plan)
 CriticalI_ChangeManager_Plan remove_plan (mixed $packageName, [mixed $version = null], [boolean $evalDepends = true])
 boolean satisfies_requirement (string $package, string $version, [CriticalI_ChangeManager_Plan $plan = null])
 void try_add ( $plan,  $pkg,  $evalDepends,  $upgrade)
 CriticalI_ChangeManager_Plan upgrade_plan (mixed $packageName, [mixed $version = null], [boolean $evalDepends = true])
 boolean will_conflict ( $pkg, [ $plan = null])
Variables
mixed $allowMultipleVersions (line 43)
  • access: protected
mixed $errors (line 44)
  • access: protected
mixed $installedList (line 42)
  • access: protected
mixed $sourceList (line 41)
  • access: protected
mixed $upgradable (line 45)
  • access: protected
Methods
Constructor __construct (line 50)

Constructor

  • access: public
CriticalI_ChangeManager_Planner __construct ( $sourceList,  $installedList,  $allowMultipleVersions)
  • $sourceList
  • $installedList
  • $allowMultipleVersions

Redefined in descendants as:
eval_requirements (line 223)

Evaluate the requirements of a plan by adding packages to meet the requirements.

  • access: protected
CriticalI_ChangeManager_Plan eval_requirements (CriticalI_ChangeManager_Plan $plan, boolean $evalDepends, [boolean $upgrade = false])
  • CriticalI_ChangeManager_Plan $plan: The plan to evaluate
  • boolean $evalDepends: If true, evaluates package dependencies
  • boolean $upgrade: If true (false by default), indicates this is an upgrade
eval_upgrade (line 299)

Evaluate an upgrade request for a set of packages.

  • access: protected
CriticalI_ChangeManager_Plan eval_upgrade (CriticalI_ChangeManager_Plan $plan, array $packages, array $versions, boolean $evalDepends)
  • CriticalI_ChangeManager_Plan $plan: The plan to evaluate
  • array $packages: List of package names to upgrade
  • array $versions: List of corresponding version requirements for the upgrade
  • boolean $evalDepends: If true, evaluates package dependencies
installed_package_instance (line 536)

Return the named CriticalI_Package_Version instance from the installed list.

  • access: protected
CriticalI_Package_Version installed_package_instance (string $package, string $version)
  • string $package: The name of the package
  • string $version: The version specification
install_plan (line 75)

Create a plan for installing the specified package or packages.

A few notes on the usage of the parameters. `packageName` may be a string specifying a single package or an array of package names. Likewise `version` may be a single version specification string or an array of version specifications. When `packageName` is a single string, `version` must also be a single string, and when `packageName` is an array, `version` must either be an array of the same size or a single string (indicating the same version specification applies to packages). If no version specification is provided, the specification "*" (meaning any version) is used.

  • access: public
CriticalI_ChangeManager_Plan install_plan (mixed $packageName, [mixed $version = null], [boolean $evalDepends = true])
  • mixed $packageName: The name or array of packages to install
  • mixed $version: The version specification (or array of specifications)
  • boolean $evalDepends: If true (default), evaluates package dependencies
is_exact_or_newer_version_installed (line 468)

Determine if a specific package version or newer is already installed.

  • access: protected
boolean is_exact_or_newer_version_installed ( $pkg, [ $plan = null])
  • $pkg
  • $plan
is_exact_version_installed (line 453)

Determine if a specific package version is already installed.

  • access: protected
boolean is_exact_version_installed ( $pkg, [ $plan = null])
  • $pkg
  • $plan
is_installed (line 440)

Determine if a package by the same name is already installed.

  • access: protected
boolean is_installed ( $pkg, [ $plan = null])
  • $pkg
  • $plan
list_missing_dependencies (line 558)

Return the list of dependencies that are not fulfilled in the system represented by the current installation and the given plan.

  • access: protected
array list_missing_dependencies (CriticalI_ChangeManager_Plan $plan)
make_install_specification (line 195)

Return the version specification as one suitable for an install requirement

  • access: protected
string make_install_specification (string $version)
  • string $version: The version specification to use
mark_upgradable (line 486)

Add the dependencies of a package to a list of upgradable packages

  • access: protected
void mark_upgradable ( $pkg)
  • $pkg
matching_versions (line 396)

Return the list of suitable package versions for installation matching the given package name and version specification.

  • access: protected
array matching_versions (string $package, string $version)
  • string $package: The name of the package
  • string $version: The version specification
normalize_package_args (line 174)

Normalize $packageName and $version arguments as passed to public methods

  • access: protected
void normalize_package_args ( &$packageName,  &$version, mixed $packageName, mixed $version)
  • mixed $packageName: The name or array of packages
  • mixed $version: The version specification (or array of specification)
  • &$packageName
  • &$version
remove_closest (line 504)

Add the closest matching installed package to the remove list

  • access: protected
void remove_closest ( $pkg,  $plan)
  • $pkg
  • $plan
remove_plan (line 108)

Create a plan for removing the specified package or packages.

See install_plan() for more information on the parameter format.

  • access: public
CriticalI_ChangeManager_Plan remove_plan (mixed $packageName, [mixed $version = null], [boolean $evalDepends = true])
  • mixed $packageName: The name or array of packages to remove
  • mixed $version: The version specification (or array of specifications)
  • boolean $evalDepends: If true (default), fails when removal would break dependencies
satisfies_requirement (line 377)

Determine if the installed set of packages satisfy the requirement for the named package and version.

  • access: protected
boolean satisfies_requirement (string $package, string $version, [CriticalI_ChangeManager_Plan $plan = null])
  • string $package: The name of the package
  • string $version: The version specification
  • CriticalI_ChangeManager_Plan $plan: Optional plan listing removed packages
try_add (line 261)

Clone a package and attempt to add a package to it

  • access: protected
void try_add ( $plan,  $pkg,  $evalDepends,  $upgrade)
  • $plan
  • $pkg
  • $evalDepends
  • $upgrade
upgrade_plan (line 140)

Create a plan for upgrading the specified package or packages.

See install_plan() for more information on the parameter format.

  • access: public
CriticalI_ChangeManager_Plan upgrade_plan (mixed $packageName, [mixed $version = null], [boolean $evalDepends = true])
  • mixed $packageName: The name or array of packages to upgrade
  • mixed $version: The version specification (or array of specifications)
  • boolean $evalDepends: If true (default), fails when upgrading would break dependencies
will_conflict (line 424)

Determine if a conflicting package is already installed (or, optionally, will be installed).

  • access: protected
boolean will_conflict ( $pkg, [ $plan = null])
  • $pkg
  • $plan

Documentation generated on Wed, 25 Apr 2012 09:46:44 -0700 by phpDocumentor 1.4.3