StackFormation\Blueprint::getProfile PHP Method

getProfile() public method

public getProfile ( $resolvePlaceholders = true )
    public function getProfile($resolvePlaceholders = true)
    {
        if (isset($this->blueprintConfig['profile'])) {
            $value = $this->blueprintConfig['profile'];
            if ($resolvePlaceholders) {
                $value = $this->valueResolver->resolvePlaceholders($this->blueprintConfig['profile'], $this, 'profile');
            }
            return $value;
        }
        return null;
    }

Usage Example

 /**
  * @param Blueprint|null $sourceBlueprint
  * @return \StackFormation\StackFactory
  */
 public function getStackFactory(Blueprint $sourceBlueprint = null)
 {
     if (!is_null($this->forceProfile)) {
         return $this->profileManager->getStackFactory($this->forceProfile);
     }
     return $this->profileManager->getStackFactory($sourceBlueprint ? $sourceBlueprint->getProfile() : null);
 }