Gets the day of the week from the supplied name string.

NOTE: casing is ignored.

@param string $name

@return DayOfWeek
@throws InvalidEnumValueException
543691
public static function fromName(string $name) : DayOfWeek
    {
        return self::fromNameMap($name, self::$fullNames, __METHOD__);
    }
513909
public function get($name = '')
    {
        if (!is_string($name)) {
            throw new InvalidArgumentException('Cookiler sadece string olarak depolanabilir');
        }

        $value = $this->reposity[$name];

        if ($this->isEncode()) {
            return $this->getEncoder()->decode($value);
        }

        return $value;
    }
718037
public function getValue($name)
    {
        $value = null;
        if ($this->has($name)) {
            $value = call_user_func_array(
                [$this->_inputs[$name], 'getValue'],
                [$name]
            );
        }
        return $value;
    }
1177335
public function get($name = null, $default = null)
    {
        $source = $this->_context->_REQUEST;

        if ($name === null) {
            return $source;
        }

        if (isset($source[$name]) && $source[$name] !== '') {
            $value = $source[$name];

            if (is_array($value) && is_scalar($default)) {
                throw new InvalidValueException(['the value of `:name` name is not scalar', 'name' => $name]);
            }

            if ($default !== null) {
                $type = gettype($default);
                if ($type === 'string') {
                    return (string)$value;
                } elseif ($type === 'integer') {
                    return (int)$value;
                } elseif ($type === 'double') {
                    return (float)$value;
                } elseif ($type === 'boolean') {
                    return (bool)$value;
                } else {
                    return $value;
                }
            } else {
                return $value;
            }
        } else {
            if ($default === null) {
                throw new MissingRequiredFieldsException($name);
            }

            return $default;
        }
    }
557712
public function getValue(string $name): ?string
    {
        if (isset($this->data[$name])) {
            return $this->data[$name]->value;
        }
        return null;
    }
1256626
public function getValueColumn($instance, string $name)
    {
        if (!$instance) {
            return null;
        }
        $parts = explode('.', $name);
        $part = array_shift($parts);

        if ($instance instanceof \Illuminate\Database\Eloquent\Collection) {
            $instance = $instance->pluck($part)->first();
        } else {
            $instance = $instance->{$part};
        }
        if (!empty($parts) && !is_null($instance)) {
            return $this->getValueColumn($instance, implode('.', $parts));
        }

        if ($instance instanceof \DateTimeInterface) {
            $instance = $this->getDateActive() ? $instance->format($this->getDateFormat()) : $instance;
        }

        return $instance;
    }
566943
public static function getWeekdayFullname($day = null)
    {
        if ($day === null) {
            $day = new AnDate();
        }
        if ($day instanceof AnDate) {
            $weekday = self::getDayOfWeek($day);
        } elseif (is_int($day)) {
            $weekday = $day;
        }
        $names = self::getWeekDays();
        return $names[$weekday];
    }
1191235
public static function createByName($name)
    {
        $constants = static::getConstantsByName();

        if (!array_key_exists($name, $constants)) {
            throw new UnexpectedValueException("Name '{$name}' is not exists in the enum constants list " . get_called_class());
        }

        return new static($constants[$name]);
    }
997678
public function get($name)
    {
        $this->checkNameIsString($name);

        if (isset($this->encrypters[$name])) {
            $encrypter = $this->encrypters[$name];
        } else {
            if (isset($this->configs[$name])) {
                $config = $this->configs[$name];
                $encrypter = new ManagedEncrypter($config);

                $this->encrypters[$name] = $encrypter;
            } else {
                throw new \InvalidArgumentException('Unknown encrypter (' . $name . ')');
            }
        }

        return $encrypter;
    }
8800
private static function constant(string $name)
    {
        $constant = static::class . '::' . $name;

        if (!defined($constant)) {
            $message = sprintf('Enum %s does not contain value named %s.', static::class, $name);
            throw new InvalidArgumentException($message);
        }

        return constant($constant);
    }
587851
public static function fromKey($name)
    {
        foreach (static::values() as $key => $enumInstance) {
            if ($enumInstance->getKey() === $name) {
                return $enumInstance;
            }
        }

        return null;
    }
1354387
private static function getCoroutineContext(string $name)
    {
        $coroutineId = self::getcoroutine();
        if (!isset(self::$coroutineLocal[$coroutineId])) {
            throw new InvalidValueException("协程上下文不存在，coroutineId=".$coroutineId);
        }

        $coroutineContext = self::$coroutineLocal[$coroutineId];
        if (isset($coroutineContext[$name])) {
            return $coroutineContext[$name];
        }
        return null;
    }
1223903
public function getColumnIndex($name)
    {
        if (!\is_array($this->mappingColumns)) {
            $this->mappingColumns = [];

            /* @var BlockInterface $column */
            foreach ($this->getColumns() as $i => $column) {
                $this->mappingColumns[$column->getName()] = $i;
            }
        }

        if (isset($this->mappingColumns[$name])) {
            $column = $this->columns[$this->mappingColumns[$name]];

            return $column->getOption('index');
        }

        throw new InvalidArgumentException(sprintf('The column name "%s" does not exist', $name));
    }
620610
public function getConstant($name)
    {
        $constants = $this->getConstants();
        $value = array_key_exists($name, $constants);
        if ($value) {
            $value = $constants[$name];
        }
        return $value;
    }
1069493
private function getFormTime(string $name): ?DateTime
    {
        $key = $this->getSessionKey($name);

        if ($this->hasFormProtection($name)) {
            return $this->session->get($key);
        }

        return null;
    }
1145181
@Nullable
    public static DayOfTheWeek valueOf(@Nullable final DayOfWeek dayOfWeek) {
        if (dayOfWeek == null) {
            return null;
        }
        final int value = dayOfWeek.getValue();
        for (final DayOfTheWeek dow : ALL) {
            if (value == dow.id) {
                return dow;
            }
        }
        throw new IllegalArgumentException("Unknown day week: " + dayOfWeek);
    }
813004
public function addInputWeek(string $name) : Element\Input\Week
    {
        $input = new Element\Input\Week($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }