public function convertServiceProperty($value)
    {
        if (is_array($value)) {
            $newVal = array();
            foreach ($value as $k => $v) {
                $newVal[$k] = $this->convertServiceProperty($v);
            }
            return $newVal;
        }

        // Evaluate service references
        if (is_string($value) && strpos($value, '%$') === 0) {
            $id = substr($value, 2);
            return $this->get($id);
        }

        // Evaluate constants surrounded by back ticks
        if (preg_match('/^`(?<name>[^`]+)`$/', $value, $matches)) {
            $envValue = Environment::getEnv($matches['name']);
            if ($envValue !== false) {
                $value = $envValue;
            } elseif (defined($matches['name'])) {
                $value = constant($matches['name']);
            } else {
                $value = null;
            }
        }

        return $value;
    }