Returns the default values of all optional parameters.

@return array The default values.
162331
public function getParameterValues()
    {
        $values = array();

        foreach ($this->parameters as $name => $parameter) {
            if (!$parameter->isRequired()) {
                $values[$name] = $parameter->getDefaultValue();
            }
        }

        return $values;
    }
572400
protected function _getDefaults() : array
    {
        $result = [
            static::FIELD_TYPE => static::DEFAULT_FIELD_TYPE,
            static::FIELD_REQUIRED => static::DEFAULT_FIELD_REQUIRED,
            static::FIELD_NON_SEARCHABLE => static::DEFAULT_FIELD_NON_SEARCHABLE,
            static::FIELD_UNIQUE => static::DEFAULT_FIELD_UNIQUE,
        ];

        return $result;
    }
1249674
protected function initializeDefaultValues()
    {
        $defaults = [];

        $filters = $this->getFilterInformation();

        foreach (array_keys($filters) as $key) {
            $defaults[ $key ] = null;
        }

        $this->defaults = $defaults;

        return $this;
    }
1268546
protected function getDefaultArgs()
    {
        $defaultArgs = [
            Argument::createBooleanTypeArgument('backend_context', false),
            Argument::createBooleanTypeArgument('force_return', false),
            Argument::createAnyTypeArgument('type'),
            Argument::createBooleanTypeArgument('no-cache', false),
            Argument::createBooleanTypeArgument('return_url', true)
        ];

        if (true === $this->countable) {
            $defaultArgs[] = Argument::createIntTypeArgument('offset', 0);
            $defaultArgs[] = Argument::createIntTypeArgument('page');
            $defaultArgs[] = Argument::createIntTypeArgument('limit', PHP_INT_MAX);
        }

        if ($this instanceof SearchLoopInterface) {
            $defaultArgs[] = Argument::createAnyTypeArgument('search_term');
            $defaultArgs[] = new Argument(
                'search_in',
                new TypeCollection(
                    new EnumListType($this->getSearchIn())
                )
            );
            $defaultArgs[] = new Argument(
                'search_mode',
                new TypeCollection(
                    new EnumType(
                        [
                            SearchLoopInterface::MODE_ANY_WORD,
                            SearchLoopInterface::MODE_SENTENCE,
                            SearchLoopInterface::MODE_STRICT_SENTENCE,
                        ]
                    )
                ),
                SearchLoopInterface::MODE_STRICT_SENTENCE
            );
        }

        return $defaultArgs;
    }
1207700
private static function getDefaults()
    {
        return [
            self::OPTION_ENDPOINT           => null,
            self::OPTION_HOST               => null,
            self::OPTION_PORT               => DefaultValues::DEFAULT_PORT,
            self::OPTION_TIMEOUT            => DefaultValues::DEFAULT_TIMEOUT,
            self::OPTION_CREATE             => DefaultValues::DEFAULT_CREATE,
            self::OPTION_UPDATE_POLICY      => DefaultValues::DEFAULT_UPDATE_POLICY,
            self::OPTION_REPLACE_POLICY     => DefaultValues::DEFAULT_REPLACE_POLICY,
            self::OPTION_DELETE_POLICY      => DefaultValues::DEFAULT_DELETE_POLICY,
            self::OPTION_REVISION           => null,
            self::OPTION_WAIT_SYNC          => DefaultValues::DEFAULT_WAIT_SYNC,
            self::OPTION_BATCHSIZE          => null,
            self::OPTION_JOURNAL_SIZE       => DefaultValues::DEFAULT_JOURNAL_SIZE,
            self::OPTION_IS_SYSTEM          => false,
            self::OPTION_IS_VOLATILE        => DefaultValues::DEFAULT_IS_VOLATILE,
            self::OPTION_CLIENT             => DefaultValues::DEFAULT_CLIENT,
            self::OPTION_TRACE              => null,
            self::OPTION_ENHANCED_TRACE     => false,
            self::OPTION_AUTH_USER          => null,
            self::OPTION_AUTH_PASSWD        => null,
            self::OPTION_AUTH_TYPE          => null,
            self::OPTION_RECONNECT          => false,
            self::OPTION_BATCH              => false,
            self::OPTION_BATCHPART          => false,
            self::OPTION_CHECK_UTF8_CONFORM => DefaultValues::DEFAULT_CHECK_UTF8_CONFORM,
        ];
    }
689158
public function getArgumentDefaults()
    {
        $values = [];
        foreach ($this->arguments as $argument) {
            $values[$argument->getName()] = $argument->getDefault();
        }

        return $values;
    }
621459
protected function getDefaultCommands()
  {
    // Keep the core default commands to have the HelpCommand which is used when using the --help option
    $defaultCommands = parent::getDefaultCommands();

    $defaultCommands[] = new ConstantsCommand();
    $defaultCommands[] = new CrudCommand();
    $defaultCommands[] = new NonStaticCommand();
    $defaultCommands[] = new RoutineLoaderCommand();
    $defaultCommands[] = new RoutineWrapperGeneratorCommand();
    $defaultCommands[] = new StratumCommand();

    return $defaultCommands;
  }
599721
public function getValue()
    {
        $value = $this->argument->getValue();
        return $value === null || $value === [] ? $this->argument->getDefaultValue() : $value;
    }
625898
public function getQueryParameters() {
        $params = array();
        $params['userId'] = $this->user_id;
        $params['itemId'] = $this->item_id;
        if (isset($this->optional['sessionId']))
            $params['sessionId'] = $this->optional['sessionId'];
        return $params;
    }
794222
public function getDefaultValuesForProperties()
    {
        $this->initialize();
        if (!isset($this->fullConfiguration['properties'])) {
            return [];
        }

        $defaultValues = [];
        foreach ($this->fullConfiguration['properties'] as $propertyName => $propertyConfiguration) {
            if (isset($propertyConfiguration['defaultValue'])) {
                $type = isset($propertyConfiguration['type']) ? $propertyConfiguration['type'] : '';
                switch ($type) {
                    case 'DateTime':
                        $defaultValues[$propertyName] = new \DateTime($propertyConfiguration['defaultValue']);
                    break;
                    default:
                        $defaultValues[$propertyName] = $propertyConfiguration['defaultValue'];
                }
            }
        }

        return $defaultValues;
    }
309522
public function getDefaultValues()
    {
        preg_match('/([0-9.]+)([A-Z]{3})/', $this->config['price'], $matches);

        $this->defaults['price'] = array(
            'currency' => (!empty($this->defaults['price']['currency']) ? $this->defaults['price']['currency'] : $matches[2]),
            'amount' => (!empty($this->defaults['price']['amount']) ? $this->defaults['price']['amount'] : $matches[1]),
            'vat' => (!empty($this->defaults['price']['vat']) ? $this->defaults['price']['vat'] : null),
        );

        return $this->defaults;
    }
1140527
public function getSearchDefaults()
    {
        $data = parent::getSearchDefaults();

        if (! isset($data[\MUtil_Model::REQUEST_ID])) {
            $data[\MUtil_Model::REQUEST_ID] = intval($this->_getIdParam());
        }

        return $data;
    }
10355
public static function defaultUrlParams() {
		$defaults = ['plugin' => false];
		$prefixes = (array)Configure::read('Routing.prefixes');
		foreach ($prefixes as $prefix) {
			$defaults[$prefix] = false;
		}
		return $defaults;
	}
317488
private function getValuesAsArray()
    {
        if ($this->value === null) {
            return is_array($this->defaultValue) 
                ? $this->defaultValue 
                : [ $this->defaultValue ];
        }
        return $this->value;
    }
85853
public function getDefault()
    {
        if ($this->reflection->isDefaultValueAvailable()
            and $default = $this->reflection->getDefaultValue()
        ) {
            if (is_scalar($default)) {
                return $default;
            } else {
                return $this->tostring($default);
            }
        }
        if ($this->reflection->isArray()) {
            return '[]';
        }
        if ($this->isPassedByReference()) {
            return 'null';
        } elseif ($this->reflection->getClass()) {
            // This gets injected as a new instance.
            return null;
        }
        $type = $this->getType();
        if (!$type) {
            $type = $this->extractParameterData();
        }
        // Guesstimated values:
        switch ($type) {
            case 'int': case 'integer': case 'float':
                return 0;
            case 'string':
                return "''";
            case 'array':
                return '[]';
        }
        return null;
    }
921312
public function getParameterDefaults()
  {
      $defaults = $this->useTraitgetParameterDefaults();

      $audit = (new Registry)->getAuditMedtadata($this->class);

      // Validation. Look for parameters specificed by the policy and not the
      // audit.
      foreach (array_keys($defaults) as $name) {
        if (!isset($audit->params[$name])) {
          Container::getLogger()->warning(strtr('Policy :name documents parameter ":param" not documented by :class.', [
            ':name' => $this->name,
            ':param' => $name,
            ':class' => $this->class,
          ]));
        }
      }

      foreach ($audit->params as $param) {
        if (!isset($defaults[$param->name])) {
          $defaults[$param->name] = isset($param->default) ? $param->default : null;
        }
      }

      $defaults['_chart'] = array_map(function ($chart) {
        $chart += $chart + [
          'type' => 'bar',
          'hide-table' => false,
          'stacked' => false,
          'series' => [],
          'series-labels' => [],
          'labels' => [],
          'title' => ''
        ];

        $el = [];
        foreach ($chart as $attr => $value) {
          $value = is_array($value) ? implode(',', $value) : $value;
          $el[] = $attr . '="' . $value . '"';
        }

        return '[[[' . implode(' ', $el) . ']]]';
      }, $this->chart);

      return $defaults;
  }
819649
private static function getDefaults()
    {
        return [
            self::OPTION_ENDPOINT                => [ ],
            self::OPTION_HOST                    => null,
            self::OPTION_PORT                    => DefaultValues::DEFAULT_PORT,
            self::OPTION_FAILOVER_TRIES          => DefaultValues::DEFAULT_FAILOVER_TRIES,
            self::OPTION_FAILOVER_TIMEOUT        => DefaultValues::DEFAULT_FAILOVER_TIMEOUT,
            self::OPTION_TIMEOUT                 => DefaultValues::DEFAULT_TIMEOUT,
            self::OPTION_MEMCACHED_PERSISTENT_ID => 'arangodb-php-pool',
            self::OPTION_MEMCACHED_OPTIONS       => [ ],
            self::OPTION_MEMCACHED_ENDPOINTS_KEY => 'arangodb-php-endpoints',
            self::OPTION_MEMCACHED_TTL           => 600,
            self::OPTION_CREATE                  => DefaultValues::DEFAULT_CREATE,
            self::OPTION_UPDATE_POLICY           => DefaultValues::DEFAULT_UPDATE_POLICY,
            self::OPTION_REPLACE_POLICY          => DefaultValues::DEFAULT_REPLACE_POLICY,
            self::OPTION_DELETE_POLICY           => DefaultValues::DEFAULT_DELETE_POLICY,
            self::OPTION_REVISION                => null,
            self::OPTION_WAIT_SYNC               => DefaultValues::DEFAULT_WAIT_SYNC,
            self::OPTION_BATCHSIZE               => null,
            self::OPTION_JOURNAL_SIZE            => DefaultValues::DEFAULT_JOURNAL_SIZE,
            self::OPTION_IS_SYSTEM               => false,
            self::OPTION_IS_VOLATILE             => DefaultValues::DEFAULT_IS_VOLATILE,
            self::OPTION_CONNECTION              => DefaultValues::DEFAULT_CONNECTION,
            self::OPTION_TRACE                   => null,
            self::OPTION_ENHANCED_TRACE          => false,
            self::OPTION_VERIFY_CERT             => DefaultValues::DEFAULT_VERIFY_CERT,
            self::OPTION_VERIFY_CERT_NAME        => DefaultValues::DEFAULT_VERIFY_CERT_NAME,
            self::OPTION_ALLOW_SELF_SIGNED       => DefaultValues::DEFAULT_ALLOW_SELF_SIGNED,
            self::OPTION_CIPHERS                 => DefaultValues::DEFAULT_CIPHERS,
            self::OPTION_AUTH_USER               => null,
            self::OPTION_AUTH_PASSWD             => null,
            self::OPTION_AUTH_TYPE               => DefaultValues::DEFAULT_AUTH_TYPE,
            self::OPTION_RECONNECT               => false,
            self::OPTION_BATCH                   => false,
            self::OPTION_BATCHPART               => false,
            self::OPTION_DATABASE                => '_system',
            self::OPTION_CHECK_UTF8_CONFORM      => DefaultValues::DEFAULT_CHECK_UTF8_CONFORM,
            self::OPTION_NOTIFY_CALLBACK         => function ($message) {}
        ];
    }