Locker\Repository\Statement\IndexOptions::mergeDefaults PHP 메소드

mergeDefaults() 보호된 메소드

Returns all of the index options set to their default or given value (using the given options).
protected mergeDefaults ( array $opts ) : [String
$opts array
리턴 [String
    protected function mergeDefaults(array $opts)
    {
        // Merges with defaults.
        $opts = parent::mergeDefaults($opts);
        // Converts types.
        $opts['active'] = $this->convertToBoolean($opts['active']);
        $opts['voided'] = $this->convertToBoolean($opts['voided']);
        $opts['related_agents'] = $this->convertToBoolean($opts['related_agents']);
        $opts['related_activities'] = $this->convertToBoolean($opts['related_activities']);
        $opts['attachments'] = $this->convertToBoolean($opts['attachments']);
        $opts['ascending'] = $this->convertToBoolean($opts['ascending']);
        $opts['limit'] = $this->convertToInt($opts['limit']);
        $opts['offset'] = $this->convertToInt($opts['offset']);
        if ($opts['limit'] === 0) {
            $opts['limit'] = 100;
        }
        return $opts;
    }