Start speaking text in this call
@param $text
@param $optionalArgs
@return \Plivo\Resources\ResponseUpdate
543775
public function startSpeaking($text, $optionalArgs)
    {
        return $this->proxyToInterface()->startSpeaking(
            $this->id, $text, $optionalArgs);
    }
14750
public function setBody($text)
    {
        if (is_string($text)) {
            $this->lines = explode("\n", $text);
        } elseif (is_array($text)) {
            $this->lines = $text;
        } else {
            throw new InvalidArgumentTypeException('Invalid body type', $text, array('string', 'array'));
        }
    }
362786
public function textToSpeech(string $text): string
    {
        if (strlen($text) > 300) {
            throw new InvalidArgumentException("Only messages under 300 characters are supported");
        }

        return $this->sendRequest("http://vaas.acapela-group.com/Services/FileMaker.mp3", [
            "prot_vers" =>  "2",
            "cl_login"  =>  $this->login,
            "cl_app"    =>  $this->application,
            "cl_pwd"    =>  $this->password,
            "req_voice" =>  "{$this->voice}22k",
            "req_spd"   =>  (string) $this->speed,
            "req_text"  =>  $text,
        ]);
    }
749707
public function prependEmpty($text=NULL) {
		
		$t = Translator::getInstance();
		
		$option			= new \stdClass();
		$option->value	= '';
		$option->text	= is_null($text) ? $t->get('SELECT_NULL_VALUE') : $text;

		$this->list = array_merge(array($option), $this->list);
		
		return $this;
		
	}
420459
public function parse($text, $context = null)
    {
        $parser = $this->getParser($context);

        $this->events->dispatch(new Parsing($parser, $context, $text));

        return $parser->parse($text);
    }
8848
private function initPayload($text)
    {
        $payload = new Payload();
        $payload->setOptions($this->getOptions());
        $payload->setQueryText($text);
        return $payload->createPayload();
    }
959586
public function send($text = null)
    {
        if ($text) {
            $this->setText($text);
        }

        $this->client->sendMessage($this);

        return $this;
    }
815824
public function setText($text)
    {
        $this->text = $text;
        $this->encodeManager->setData($text);

        return $this;
    }
1030028
public static function preg($text, $preg)
	{
	    if (!$preg) {
	        throw new \InvalidArgumentException('Please set the $preg pattern');
	    }

	    if (is_array($preg)) {
	        if (empty($preg['preg'])) {
	            throw new \InvalidArgumentException('The $preg argument must have "preg" key');
	        }
	        $preg = $preg['preg'];
	    }

	    return (bool)preg_match($preg, $text);
	}
966593
private function addBrackets($text, $subPattern = null)
    {
        if ($text instanceof VerbalExpression) {
            return $text->compile();
        }

        return $this->generateOpeningBracket($subPattern) .  $text . ')';
    }
894420
public function text($text)
    {
        if (is_string($text) || settype($text, 'string') !== false) {
            return parent::text($this->encodeString($text));
        }
        throw new \InvalidArgumentException(get_class($this) . ':text - Cannot cast passed value to string (did you forget to define a __toString on your object?)');
    }
1119021
public function setText($text) {
		if( !is_string($text) ) {
			throw new \Exception('RequireStringParameter');
		}
		$this->setTEXTBody(strip_tags($text));
		$this->setHTMLBody(nl2br($text));
	}
765803
public function addNext($text, $template = null)
    {
        if(!empty($text))
        {
            $this->callToActions = ['message' => ['text' => $text]];
        }
        
        if(!empty($template))
        {
            if($template instanceof StructuredMessage)
            {
                $this->callToActions = ['message' => [$template->getDataForCall(FALSE)]];
            }
            else
            {
                throw new MessengerPlatformException('Template for welcome message is not StructuredMessage.', 4);
            }
        }
    }
365378
public function addIconToText($text, OptionsParser $options)
    {
        $icon = $options->consume('icon');
        $align = $options->consume('icon-align');

        if (!$icon) {
            return [$text, $options];
        }

        $icon = $this->icon($icon);

        if (empty($text)) {
            $text = $icon;
        } elseif ($align === 'right') {
            $text = sprintf('%s %s', $text, $icon);
        } else {
            $text = sprintf('%s %s', $icon, $text);
        }

        return [$text, $options];
    }
1025018
public function submit ($text, $options = [])
		{
			$this->label(false);
			$this->parts[ '{input}' ] = Html::submitButton($text, [ 'class' => 'btn btn-lg btn-primary', 'name' => 's-' . $this->attribute ]);

			return $this;
		}
370749
public function ask($text, $default = '', $displayDefault = true)
    {
        if ($displayDefault && !empty($default)) {
            $defaultText = $default;
            if (strlen($defaultText) > 30) {
                $defaultText = substr($default, 0, 30) . '...';
            }
            $text .= " [$defaultText]";
        }
        $this->textWriter->write("$text ");
        return trim(fgets(STDIN)) ?: $default;
    }
54371
public function inject($text)
    {
        if (!is_string($text)) {
            return $text; // nothing to do here
        }

        foreach ($this->parameters as $key => $parameter) {
            if (strpos($text, $key) === false) {
                continue;
            }

            if (is_callable($parameter)) {
                $parameter = call_user_func($parameter);
            }

            $text = str_replace($key, $parameter, $text);
        }

        return $text;
    }