@param string $optionName
@param mixed  $defaultValue

@return mixed
484724
public function getOption($optionName, $defaultValue = null)
    {
        $option = $this->optionManager->findOneByOptionName($optionName);

        return $option ?: $defaultValue;
    }
1245274
protected function getRequestParamValue(string $defaultValue = null, string $defaultName = 'id'): ?string
    {
        $paramName = $this->getRequestParamName($defaultName);

        return $this->request->get($paramName, $defaultValue);
    }
1186883
public function setActionOption($actionName, $optionName, $optionValue)
    {
        $this->getAction($actionName)->setOption($optionName, $optionValue);

        return $this;
    }
748186
public final function getOption( string $name, $defaultValue = false )
   {

      if ( ! $this->hasOption( $name ) )
      {
         return $defaultValue;
      }

      return $this->_options[ $name ];

   }
1338331
public function addOption($name, $defaultValue)
    {
        if ($this->hasOption($name)) {
            throw new \LogicException(sprintf('The option "%s" already exists.', $name));
        }

        $this->options[$name] = $defaultValue;

        return $this;
    }
1209645
public static function setPatternData($optionName,$optionValue) {

		if (isset(self::$store["patternSpecific"][$optionName])) {
			self::$store["patternSpecific"][$optionName]["data"] = $optionValue;
			return true;
		}

		return false;

	}
27455
public static function getInfo( $key = null, $defaultValue = null )
    {
        return null === $key ? static::$_info : Option::get( static::$_info, $key, $defaultValue );
    }
116803
public String get(String propertyName, String defaultValue)
    {
        return properties.getProperty(propertyName, defaultValue);
    }
814177
protected function extractDefault($defaultValue)
	{
		if($defaultValue==='true')
			$this->defaultValue=true;
		elseif($defaultValue==='false')
			$this->defaultValue=false;
		elseif(strpos($defaultValue,'nextval')===0)
			$this->defaultValue=null;
		elseif(preg_match('/^\'(.*)\'::/',$defaultValue,$matches))
			$this->defaultValue=$this->typecast(str_replace("''","'",$matches[1]));
		elseif(preg_match('/^(-?\d+(\.\d*)?)(::.*)?$/',$defaultValue,$matches))
			$this->defaultValue=$this->typecast($matches[1]);
		// else is null
	}
953332
public static function get(string $filename, string $defaultValue = ''): string
    {
        if (!self::exist($filename)) {
            return $defaultValue;
        }
        return file_get_contents($filename);
    }
10005
public function getProperty($key, $defaultValue = null)
    {
        if (empty($this->properties[$key])) {
            return $defaultValue;
        }

        return $this->properties[$key];
    }
195586
protected function createOptionValueBag($initialValue)
    {
        $result = new OptionValueBag();
        if (null !== $initialValue) {
            $result->add($initialValue);
        }

        return $result;
    }
1070767
protected function getConfigArrayOption($optionName, $defaultValue = null)
    {
        if (!isset($this->config[$optionName])) {
            return $defaultValue;
        }

        return $this->config[$optionName];
    }
1286415
public function param(string $name, $defaultValue = null)
    {
        if (array_key_exists($name, $this->parameters)) {
            return $this->parameters[$name];
        }

        return $defaultValue;
    }
843302
protected function getFieldId($optionValue = null)
    {
        if (!is_null($optionValue)) {
            return sprintf('%s_%s', $this->name, $this->cleanValue($optionValue));
        }

        return $this->name;
    }
19135
public static function setOptionLink($optionName,$optionValue) {

		if (!isset(self::$store["link"])) {
			self::$store["link"] = array();
		}

		self::$store["link"][$optionName] = $optionValue;

	}
1240121
public function get_categories_display_option($optionname, $defaultvalue = null) {
        if (array_key_exists($optionname, $this->categoriesdisplayoptions)) {
            return $this->categoriesdisplayoptions[$optionname];
        } else {
            return $defaultvalue;
        }
    }