コード例 #1
0
 /**
  * @param string $rootDirectory
  * @param Shopfile $shopfile
  * @return array
  */
 public function generatePlan($rootDirectory, Shopfile $shopfile)
 {
     $actions = [];
     foreach ($shopfile->getMergeRules() as $mergeRule) {
         $actions = array_merge($actions, $this->actionsForMergeRule($rootDirectory, $mergeRule));
     }
     foreach ($shopfile->getProtectRules() as $protectRule) {
         $actions = array_merge($actions, $this->actionsForProtectRule($rootDirectory, $protectRule));
     }
     foreach ($shopfile->getReplaceRules() as $replaceRule) {
         $actions = array_merge($actions, $this->actionsForReplaceRule($rootDirectory, $replaceRule));
     }
     return $actions;
 }