PHP Class SimpleSoftwareIO\SMS\OutgoingMessage

Show file Open project: simplesoftwareio/simple-sms Class Usage Examples

Protected Properties

Property Type Description
$attachImages array Array of attached images.
$data array The data that will be passed into the Illuminate View Factory.
$from string The number messages are being sent from.
$mms boolean Whether a message is a MMS or SMS.
$to array Array of numbers a message is being sent to.
$view string The view file to be used when composing a message.
$views Illuminate\View\Factory The Illuminate view factory.

Public Methods

Method Description
__construct ( Illuminate\View\Factory $views ) Create a OutgoingMessage Instance.
attachImage ( string $image ) Attaches an image to a message.
composeMessage ( ) : Illuminate\View\Factory Composes a message.
data ( array $data ) Sets the data for the view file.
from ( string $number ) Sets the numbers messages will be sent from.
getAttachImages ( ) : array Returns the attached image.
getData ( ) : array Returns the view data.
getFrom ( ) : string Gets the from address.
getTo ( ) : array Returns the To addresses without the carriers.
getToWithCarriers ( ) : array Returns all numbers that a message is being sent to and includes their carriers.
getView ( ) : string Returns the current view file.Returns.
isMMS ( ) : boolean Returns if a message is a MMS.Returns.
to ( string $number, string $carrier = null ) Sets the to addresses.
view ( string $view ) Sets the view file to be loaded.

Method Details

__construct() public method

Create a OutgoingMessage Instance.
public __construct ( Illuminate\View\Factory $views )
$views Illuminate\View\Factory

attachImage() public method

Attaches an image to a message.
public attachImage ( string $image )
$image string Path to image.

composeMessage() public method

Composes a message.
public composeMessage ( ) : Illuminate\View\Factory
return Illuminate\View\Factory

data() public method

Sets the data for the view file.
public data ( array $data )
$data array An array of values to be passed to the View Factory.

from() public method

Sets the numbers messages will be sent from.
public from ( string $number )
$number string Holds the number that messages

getAttachImages() public method

Returns the attached image.
public getAttachImages ( ) : array
return array

getData() public method

Returns the view data.
public getData ( ) : array
return array

getFrom() public method

Gets the from address.
public getFrom ( ) : string
return string

getTo() public method

Returns the To addresses without the carriers.
public getTo ( ) : array
return array

getToWithCarriers() public method

Returns all numbers that a message is being sent to and includes their carriers.
public getToWithCarriers ( ) : array
return array An array with numbers and carriers

getView() public method

Returns the current view file.Returns.
public getView ( ) : string
return string

isMMS() public method

Returns if a message is a MMS.Returns.
public isMMS ( ) : boolean
return boolean

to() public method

Sets the to addresses.
public to ( string $number, string $carrier = null )
$number string Holds the number that a message will be sent to.
$carrier string The carrier the number is on.

view() public method

Sets the view file to be loaded.
public view ( string $view )
$view string The desired view file

Property Details

$attachImages protected property

Array of attached images.
protected array $attachImages
return array

$data protected property

The data that will be passed into the Illuminate View Factory.
protected array $data
return array

$from protected property

The number messages are being sent from.
protected string $from
return string

$mms protected property

Whether a message is a MMS or SMS.
protected bool $mms
return boolean

$to protected property

Array of numbers a message is being sent to.
protected array $to
return array

$view protected property

The view file to be used when composing a message.
protected string $view
return string

$views protected property

The Illuminate view factory.
protected Factory,Illuminate\View $views
return Illuminate\View\Factory