public function save(Model\EnvironmentInterface $environment, Model\EnvironmentInterface $cloneFrom = null)
    {
        $content = $this->getEnvironmentHydrator()->extract($environment);
        if ($cloneFrom != null) {
            $content['cloneFrom'] = strval($cloneFrom->getNormalizedName());
        }
        $this->pmProxyClient->put('/environments/' . $environment->getNormalizedName(), $content);
        if ($environment->hasChildren()) {
            foreach ($environment->getChildren() as $child) {
                /** @var Model\EnvironmentInterface $child */
                if ($cloneFrom) {
                    $this->save($child, $cloneFrom->getChildByName($child->getName()));
                } else {
                    $this->save($child);
                }
            }
        }
        return $this;
    }