source/Spiral/ORM/Schemas/RecordSchema.php
protected function mutateValue(array $mutators, string $field, $default)
    {
        //Let's process default value using associated setter
        if (isset($mutators[RecordEntity::MUTATOR_SETTER][$field])) {
            try {
                $setter = $mutators[RecordEntity::MUTATOR_SETTER][$field];
                $default = call_user_func($setter, $default);

                return $default;
            } catch (\Exception $exception) {
                //Unable to generate default value, use null or empty array as fallback
            }
        }

        if (isset($mutators[RecordEntity::MUTATOR_ACCESSOR][$field])) {
            $default = $this->accessorDefault(
                $default,
                $mutators[RecordEntity::MUTATOR_ACCESSOR][$field]
            );

            return $default;
        }

        return $default;
    }
protected function mutateValue(array $mutators, string $field, $default)
    {
        //Let's process default value using associated setter
        if (isset($mutators[RecordEntity::MUTATOR_SETTER][$field])) {
            try {
                $setter = $mutators[RecordEntity::MUTATOR_SETTER][$field];
                $default = call_user_func($setter, $default);

                return $default;
            } catch (\Exception $exception) {
                //Unable to generate default value, use null or empty array as fallback
            }
        }

        if (isset($mutators[RecordEntity::MUTATOR_ACCESSOR][$field])) {
            $default = $this->accessorDefault(
                $default,
                $mutators[RecordEntity::MUTATOR_ACCESSOR][$field]
            );

            return $default;
        }

        return $default;
    }
protected function mutateValue ( array $ mutators , string $ field , $ default ) { //Let's process default value using associated setter if ( isset ( $ mutators [ RecordEntity :: MUTATOR_SETTER ] [ $ field ] ) ) { try { $ setter = $ mutators [ RecordEntity :: MUTATOR_SETTER ] [ $ field ] ; $ default = call_user_func ( $ setter , $ default ) ; return $ default ; } catch ( \ Exception $ exception ) { //Unable to generate default value, use null or empty array as fallback } } if ( isset ( $ mutators [ RecordEntity :: MUTATOR_ACCESSOR ] [ $ field ] ) ) { $ default = $ this -> accessorDefault ( $ default , $ mutators [ RecordEntity :: MUTATOR_ACCESSOR ] [ $ field ] ) ; return $ default ; } return $ default ; }
Process value thought associated mutator if any.

@param array  $mutators
@param string $field
@param mixed  $default

@return mixed
Process value thought associated mutator if any .