Sets "from" name postfix.

@param string $fromPostfix

@return static
@throws InvalidArgumentException On invalid argument
423325
public function setFromPostfix($fromPostfix)
    {
        if (!is_string($fromPostfix) || empty($fromPostfix)) {
            throw new InvalidArgumentException('"From postfix" argument must be string and must not be empty.');
        }

        $this->fromPostfix = $fromPostfix;

        return $this;
    }
571854
public function setFrom(\WobbleCode\UserBundle\Document\User $from)
    {
        $this->from = $from;
        return $this;
    }
939091
public function getFromEmail($from): string
    {
        if (is_string($from)) {
            return $from;
        }
        if ($from instanceof User) {
            return $from->email;
        }
        if (is_array($from)) {
            $first = reset($from);
            $key = key($from);
            if (is_numeric($key)) {
                return $this->getFromEmail($first);
            }
            return $key;
        }
        throw new InvalidConfigException('Can\'t determine "From" email from email config settings.');
    }
10804
public function setFromType($fromType)
    {
        $allowedValues = $this->getFromTypeAllowableValues();
        if (!in_array($fromType, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'fromType', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['fromType'] = $fromType;

        return $this;
    }
1143997
public static SuggestedFix postfixWith(Tree node, String postfix) {
    return builder().postfixWith(node, postfix).build();
  }
1294750
protected function setPrefix($prefix)
    {
        if (is_string($prefix)) {
            $this->prefix = $prefix;

            return $this;
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($prefix). "' for argument 'prefix' given."
            );
        }
    }
1032198
public function SetFrom($address, $name = '')
    {
        $address = trim($address);
        $name    = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
        if (!self::ValidateAddress($address)) {
            $this->SetError($this->Lang('invalid_address') . ': ' . $address);
            if ($this->exceptions) {
                throw new phpmailerException($this->Lang('invalid_address') . ': ' . $address);
            }
            echo $this->Lang('invalid_address') . ': ' . $address;
            return false;
        }
        $this->From     = $address;
        $this->FromName = $name;
        return true;
    }
455022
public function setAction($action, $postfix = null)
    {
        if (!$action) {
            return;
        }
        if (!isset($action['parent'])) {
            $action['parent'] = $this->switch;
        }
        $this->switch->controller->setInternalAction($this->getId($postfix), $action);
    }
1355350
public function setFromType($from_type)
    {
        if ($from_type == $this->from_type) return $this;
        $from_type = strtoupper($from_type);
        if (!isset(self::getAddressTypes()[$from_type])) {
            throw new \InvalidArgumentException(sprintf('The "%s" from_type is not a valid address type.', $from_type));
        }

        $this->from_type = $from_type;
        return $this;
    }
581690
public static function rename($from, $to)
    {
        $object = get_class(self::$driver);

        return $object::rename($from, $to);
    }
406723
function(list, prefix, postfix) {
            prefix  = prefix  ? prefix.value  : "[";
            postfix = postfix ? postfix.value : "]";
            return new Anonymous(toString(list, prefix, postfix));
        }
869838
public function setVendorPrefix($vendorPrefix)
    {
        if (is_string($vendorPrefix)) {
            $this->vendorPrefix = $vendorPrefix;
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($vendorPrefix). "' for argument 'vendorPrefix' given."
            );
        }
    }
154541
public function setFromType($fromType)
    {
        $allowed_values = array('agent', 'npc_corp', 'faction');
        if ((!in_array($fromType, $allowed_values))) {
            throw new \InvalidArgumentException("Invalid value for 'fromType', must be one of 'agent', 'npc_corp', 'faction'");
        }
        $this->container['fromType'] = $fromType;

        return $this;
    }
166794
public function from(string $from) : self
    {
        // $from can either be
        // a) a field name indicating a reference to a different document. Currently, only REFERENCE_STORE_AS_ID is supported
        // b) a Class name
        // c) a collection name
        // In cases b) and c) the local and foreign fields need to be filled
        if ($this->class->hasReference($from)) {
            return $this->fromReference($from);
        }

        // Check if mapped class with given name exists
        try {
            $this->targetClass = $this->dm->getClassMetadata($from);
        } catch (BaseMappingException $e) {
            $this->from = $from;
            return $this;
        }

        if ($this->targetClass->isSharded()) {
            throw MappingException::cannotUseShardedCollectionInLookupStages($this->targetClass->name);
        }

        $this->from = $this->targetClass->getCollection();
        return $this;
    }
306912
public static function addPostfixToFile($path, $postfix = null)
    {
        if ($postfix === null || $postfix == '') {
            return $path;
        }

        $parts = explode('.', $path);

        if (count($parts) === 1) {
            return $postfix . $path;
        }

        $parts[count($parts) - 2] .= $postfix;

        return implode('.', $parts);
    }
114016
public static function setMessage($message, $from = null, $color = null)
    {
        if (!empty($from)) {
            static::setFrom($from);
        }
        if (!empty($color)) {
            static::setColor($color);
        }

        if (is_object($message)) {
            static::$message = $message;
        } else {
            static::$message = new Message();
            static::$message->setMessage($message);
            static::$message->setFrom(static::getFrom());
            static::$message->setColor(static::getColor());
        }
    }
1188390
protected function createNewIndex(string $postfix): void
    {
        $this->nodeIndexer->setIndexNamePostfix($postfix ?: (string)time());
        if ($this->nodeIndexer->getIndex()->exists() === true) {
            $this->logger->log(sprintf('Deleted index with the same postfix (%s)!', $postfix), LOG_WARNING);
            $this->nodeIndexer->getIndex()->delete();
        }
        $this->nodeIndexer->getIndex()->create();
        $this->logger->log('Created index ' . $this->nodeIndexer->getIndexName());
    }