Create a new AlphaSenderInstance

@param string $alphaSender An Alphanumeric Sender ID string, up to 11
characters.
@return AlphaSenderInstance Newly created AlphaSenderInstance
@throws TwilioException When an HTTP error occurs.
503807
public function create($alphaSender) {
        $data = Values::of(array('AlphaSender' => $alphaSender, ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new AlphaSenderInstance($this->version, $payload, $this->solution['serviceSid']);
    }
908005
public static function create($data = null, $transformer = null, $serializer = null)
    {
        $instance = new static(new Manager());

        $instance->data = $data;
        $instance->dataType = $instance->determineDataType($data);
        $instance->transformer = $transformer ?: null;
        $instance->serializer = $serializer ?: null;

        return $instance;
    }
434919
public static function makeMasternodeReleaseInstance(string $address): self
    {
        $transaction = new self();

        $transaction->setVersion(Version::MASTERNODE_RELEASE);
        return self::setMasternodeCommandDefaults($address, $transaction);
    }
137837
public static function create(string $recognizer): self
    {
        $recognizerDeviation = new self();

        $recognizerDeviation->type       = self::TYPE;
        $recognizerDeviation->recognizer = $recognizer;

        return $recognizerDeviation;
    }
771025
public static function create(?string $payload, ?string $encodedPayload = null, bool $isPayloadDetached = false): self
    {
        return new self($payload, $encodedPayload, $isPayloadDetached);
    }
264676
public static function create($parsed)
    {
        $inputEndpoint = new self();
        $vip = Utilities::tryGetValue($parsed, Resources::XTAG_VIP);
        $port = Utilities::tryGetValue($parsed, Resources::XTAG_PORT);
        $roleName = Utilities::tryGetValue(
            $parsed,
            Resources::XTAG_ROLE_NAME
        );

        $inputEndpoint->setPort($port);
        $inputEndpoint->setRoleName($roleName);
        $inputEndpoint->setVip($vip);

        return $inputEndpoint;
    }
332790
private LanguageDetector makeDetector() throws IOException {
        double alpha = getParamDouble("alpha", DEFAULT_ALPHA);
        String profileDirectory = requireParamString("directory") + "/";
        Optional<Long> seed = Optional.fromNullable(getParamLongOrNull("seed"));

        List<LanguageProfile> languageProfiles = new LanguageProfileReader().readAll(new File(profileDirectory));

        return LanguageDetectorBuilder.create(NgramExtractors.standard())
                .alpha(alpha)
                .seed(seed)
                .shortTextAlgorithm(50)
                .withProfiles(languageProfiles)
                .build();
    }
8207
public function createMessageId() {

        $time = time();

        if ($this->_from !== null) {
            $user = $this->_from;
        } elseif (isset($_SERVER['REMOTE_ADDR'])) {
            $user = $_SERVER['REMOTE_ADDR'];
        } else {
            $user = getmypid();
        }

        $rand = mt_rand();

        if ($this->_recipients !== array()) {
            $recipient = array_rand($this->_recipients);
        } else {
            $recipient = 'unknown';
        }

        if (isset($_SERVER["SERVER_NAME"])) {
            $hostName = $_SERVER["SERVER_NAME"];
        } else {
            $hostName = php_uname('n');
        }

        return sha1($time . $user . $rand . $recipient) . '@' . $hostName;
    }
665473
public static function create(array $payload): self
    {
        $senderId = isset($payload['sender']) ? $payload['sender']['id'] : '';
        $recipientId = $payload['recipient']['id'];
        $timestamp = $payload['timestamp'];
        $appRoles = AppRoles::create($payload['app_roles']);

        return new static($senderId, $recipientId, $timestamp, $appRoles);
    }
417438
public static function makeMasternodeCreateInstance(string $ipAddress, string $address): self
    {
        $transaction = new self();

        $transaction->setVersion(Version::MASTERNODE_CREATE);
        $transaction->setDestinationAddress($address);
        $transaction->setValue(self::VALUE_MASTERNODE_CREATE);
        $transaction->setFee(self::FEE_MASTERNODE_CREATE);
        $transaction->setMessage($ipAddress);

        return $transaction;
    }
1071254
public function create($namespace, $recipient, $expireIn = 300, $length = 6, $type = 'numeric')
    {
        $validCode = new ValidCode();
        $validCode->setNamespace($namespace);
        $validCode->setRecipient($recipient);
        $now = new \DateTime();
        $expiredAt = $now->add(new \DateInterval('PT' . $expireIn . 'S'));
        $validCode->setExpiredAt($expiredAt);
        $code = Str::random($length, $type);
        $validCode->setCode($code);
        $cacheKey = $this->getCacheKey($namespace, $recipient);
        $this->cache->save($cacheKey, $validCode, $expireIn);
        return $code;
    }
955772
public static function createFromString($globalIdentifier)
    {
        @trigger_error(
            'IDEncoder::createFromString has been deprecated since v1.1 and will be removed v2.0, use IDEncoder::decode() instead',
            E_USER_DEPRECATED
        );

        $typeAndUser = base64_decode($globalIdentifier);
        if (strpos($typeAndUser, self::DIVIDER) > 1) {
            list($nodeType, $databaseId) = explode(self::DIVIDER, $typeAndUser);
        } else {
            $nodeType = null;
            $databaseId = null;
        }

        return new self($nodeType, $databaseId);
    }
180209
public static function createFromString(string $token) : SignedJwt
    {
        $segments = explode('.', $token);

        if (count($segments) !== 3) {
            throw new InvalidArgumentException('Token did not contain 3 segments');
        }

        list($encodedHeader, $encodedPayload, $encodedSignature) = $segments;
        $decodedHeader = \json_decode(self::base64UrlDecode($encodedHeader), true, 512, JSON_BIGINT_AS_STRING);
        $decodedPayload = \json_decode(self::base64UrlDecode($encodedPayload), true, 512, JSON_BIGINT_AS_STRING);
        $signature = self::base64UrlDecode($encodedSignature);

        if ($decodedHeader === null) {
            throw new InvalidArgumentException('Invalid header');
        }

        if ($decodedPayload === null) {
            throw new InvalidArgumentException('Invalid payload');
        }

        if (!isset($decodedHeader['alg'])) {
            throw new InvalidArgumentException('No algorithm set in header');
        }

        $header = new JwtHeader($decodedHeader['alg'], $decodedHeader);
        $payload = new JwtPayload();

        if (is_array($decodedPayload)) {
            foreach ($decodedPayload as $name => $value) {
                $payload->add($name, $value);
            }
        }

        return new self($header, $payload, $signature);
    }
87230
public static function create($defaultEncoding = 'UTF-8')
    {
        if (isset(self::$chain[$defaultEncoding])) {
            return self::$chain[$defaultEncoding];
        }
        
        $transcoders = [];
        
        try {
            $transcoders[] = new MbTranscoder($defaultEncoding);
        } catch (ExtensionMissingException $mb) {
            // Ignore missing mbstring extension; fall back to iconv
        }

        try {
            $transcoders[] = new IconvTranscoder($defaultEncoding);
        } catch (ExtensionMissingException $iconv) {
            // Neither mbstring nor iconv
            throw $iconv;
        }
        
        self::$chain[$defaultEncoding] = new self($transcoders);

        return self::$chain[$defaultEncoding];
    }
310843
public static function create(array $payload): self
    {
        $senderId = $payload['sender']['id'];
        $recipientId = $payload['recipient']['id'];
        $timestamp = $payload['timestamp'];
        $postback = Postback::create($payload['postback']);

        return new static($senderId, $recipientId, $timestamp, $postback);
    }
252100
private function createContentTeaserFromTeaser(Teaser $teaser)
    {
        if (!isset($this->contentTeasers[$teaser->getId()])) {
            $contentTeaser = new ContentTeaser();
            $contentTeaser
                ->setId($teaser->getId())
                ->setLayoutareaId($teaser->getLayoutareaId())
                ->setTreeId($teaser->getTreeId())
                ->setEid($teaser->getEid())
                ->setTypeId($teaser->getTypeId())
                ->setType($teaser->getType())
                ->setSort($teaser->getSort())
                ->setCache($teaser->getCache())
                ->setAttributes($teaser->getAttributes())
                ->setCreatedAt($teaser->getCreatedAt())
                ->setCreateUserId($teaser->getCreateUserId());

            $contentTeaser->setTitle($this->mediator->getTitle($teaser, 'navigation', $this->language));
            $contentTeaser->setUniqueId($this->mediator->getUniqueId($teaser));

            $this->contentTeasers[$teaser->getId()] = $contentTeaser;
        }

        return $this->contentTeasers[$teaser->getId()];
    }
324592
public function setSender(string  $sender): void
    {

        if (preg_match("/^\+?[0-9]+$/m", $sender) && strlen($sender) > 18) {
            trigger_error(
                "Sender number too long, max length is 18 digits",
                E_USER_WARNING
            );
        } elseif (preg_match("/[a-zA-Z]+/m", $sender) && strlen($sender) > 11) {
            trigger_error(
                "Sender string too long, non numeric senders have max length of 11 characters.",
                E_USER_WARNING
            );
        }
        // We do not truncate the sender as the API will do that and the developer might request the sender string back.
        $this->from = $sender;
    }