Platformsh\Cli\Command\Project\ProjectInfoCommand::setProperty PHP Метод

setProperty() защищенный Метод

protected setProperty ( string $property, string $value, Platformsh\Client\Model\Project $project, boolean $noWait ) : integer
$property string
$value string
$project Platformsh\Client\Model\Project
$noWait boolean
Результат integer
    protected function setProperty($property, $value, Project $project, $noWait)
    {
        if (!$this->validateValue($property, $value)) {
            return 1;
        }
        $type = $this->getType($property);
        if ($type === 'boolean' && $value === 'false') {
            $value = false;
        }
        settype($value, $type);
        $currentValue = $project->getProperty($property);
        if ($currentValue === $value) {
            $this->stdErr->writeln("Property <info>{$property}</info> already set as: " . $this->formatter->format($value, $property));
            return 0;
        }
        $project->ensureFull();
        $result = $project->update([$property => $value]);
        $this->stdErr->writeln("Property <info>{$property}</info> set to: " . $this->formatter->format($value, $property));
        $this->api()->clearProjectsCache();
        $success = true;
        if (!$noWait) {
            $success = ActivityUtil::waitMultiple($result->getActivities(), $this->stdErr, $project);
        }
        return $success ? 0 : 1;
    }