Return the method name for the setter of a given variable

Example: Converts 'user_id' to 'setUserId'

@param  string $key Key of the variable in $this->object
@return string
338995
protected function getSetter($key)
    {
        $key = str_replace('_', ' ', $key);
        $key = ucwords($key);
        $key = str_replace(' ', '', $key);

        return 'set'.$key;
    }
1299197
private function getUsingLoaderMethod($key)
    {
        $value = false;

        $loader_method = $this->getLoaderMethod($key);
        if (method_exists($this, $loader_method)) {
            if ($this->hasSubDataObject($key)) {
                // return loaded sub-dataobject
                $value = $this->getSubDataObject($key);
            } else {
                // use loader method to load sub-dataobject
                $this->checkDB();
                $this->setSubDataObject(
                    $key,
                    call_user_func(array($this, $loader_method))
                );

                $value = $this->getSubDataObject($key);
            }
        }

        return $value;
    }
853876
private function getFilenameFromKey($key)
    {
        $name = $this->directory.self::PREFIX.$key;

        return str_replace('\\', '-', $name);
    }
1256384
protected function getInfo(
        /*# string */ $key,
        /*# string */ $method = 'server'
    ) {
        if ('server' === $method) {
            $key = strtoupper($key);
        }
        $data = $this->$method;

        if (empty($key)) {
            return $data;
        } elseif (isset($data[$key])) {
            return $data[$key];
        } else {
            return null;
        }
    }
1230803
public function key($key)
    {
        if (empty($key)) {
            return false;
        }

        $key = Inflector::underscore(str_replace(
            [DIRECTORY_SEPARATOR, '/', '.', '<', '>', '?', ':', '|', '*', '"'],
            '_',
            (string)$key
        ));

        return $key;
    }
1179664
public function getUsersRelationValue($key)
    {
        if ($this->relationLoaded($key)) {
            return $this->relations[$key];
        }

        return $this->getRelationshipFromMethod($key);
    }
1293097
protected function getCacheKey($key, SettingsOwnerInterface $owner = null)
    {
        return sprintf(self::PREFIX, $owner ? $owner->getSettingIdentifier() : '', $key);
    }
941461
public function getConfig($key = null) {
		$configPath = 'CakeSettingsApp';
		if (!empty($key)) {
			$configPath .= '.' . $key;
		}

		$result = Configure::read($configPath);

		return $result;
	}
593535
protected function get($key)
    {
        $this->checkForNonEmptyKey($key);
        if (!isset($this->getBackEndUser()->uc[self::PHPUNIT_SETTINGS_KEY][$key])) {
            return null;
        }

        return $this->getBackEndUser()->uc[self::PHPUNIT_SETTINGS_KEY][$key];
    }
420735
private function getParameterName($key)
    {
        $parameterName = $this->parameters->get('parameter_name');
        if (isset($parameterName[$key]) && !is_array($parameterName[$key])) {
            return $parameterName[$key];
        }

        return $key;
    }
32154
public function getId($key = null)
    {
        return (isset($this->index[$key]) && !is_null($key)) ?
            $this->index[$key] :
            $this->index[$this->getKeyName()];
    }
1051492
public static function getSetting($key)
    {
        $setting = Settings::all()->where('settingsKey', $key)->first();
        if($setting) {
            return $setting->value;
        }
        return;
    }
806696
public function iconGetName($key)
  {
    $iconid = ($this[$key] < 0) ? (pow(2, 32))-($this[$key]*-1) : $this[$key];

    return new Str("/icon_" . $iconid);
  }
1082166
public function getKeyValue($key)
    {
        foreach ($this->array as $k => $v) {
            if (strtolower($key) == strtolower($k)) {
                return $v;
            }
        }

        return '';
    }
1224225
protected function getFilename($key): string
    {
        $id = $this->keyToId($key);
        $generator = $this->getFilenameOption();

        return $this->cacheDir . DIRECTORY_SEPARATOR . $generator($id);
    }
272756
public function setting($key)
    {
        return isset($this->settings[$key]) ? $this->settings[$key] : null;
    }
836452
public function getVariable($key)
    {
        if (!isset($this->variables[$key])) {
            return null;
        }
        return $this->variables[$key];
    }