Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
DeployManager Class Reference

Public Member Functions

 __construct (IOInterface $io)
 
 addPackage (Entry $package)
 
 setSortPriority ($priorities)
 

Protected Member Functions

 sortPackages ()
 

Protected Attributes

 $packages = array()
 
 $io
 
 $sortPriority = array()
 

Detailed Description

Definition at line 16 of file DeployManager.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( IOInterface  $io)

Definition at line 47 of file DeployManager.php.

Member Function Documentation

◆ addPackage()

addPackage ( Entry  $package)

Definition at line 52 of file DeployManager.php.

53  {
54  $this->packages[] = $package;
55  }

◆ setSortPriority()

setSortPriority (   $priorities)

Definition at line 57 of file DeployManager.php.

58  {
59  $this->sortPriority = $priorities;
60  }

◆ sortPackages()

sortPackages ( )
protected

Uses the sortPriority Array to sort the packages.

Highest priority first. Copy gets per default higher priority then others

Returns
array

Definition at line 70 of file DeployManager.php.

71  {
72  usort(
73  $this->packages,
74  function ($a, $b) {
75  $aPriority = $this->getPackagePriority($a);
76  $bPriority = $this->getPackagePriority($b);
77  if ($aPriority == $bPriority) {
78  return 0;
79  }
80  return ($aPriority > $bPriority) ? -1 : 1;
81  }
82  );
83 
84  return $this->packages;
85  }

Field Documentation

◆ $io

$io
protected

Definition at line 26 of file DeployManager.php.

◆ $packages

$packages = array()
protected

Definition at line 21 of file DeployManager.php.

◆ $sortPriority

$sortPriority = array()
protected

Definition at line 33 of file DeployManager.php.


The documentation for this class was generated from the following file: