rcrowe\Hippy\Client::setFrom PHP Method

setFrom() public method

Set who the message will be sent from.
public setFrom ( string $from ) : void
$from string Message will be sent by this user.
return void
    public function setFrom($from)
    {
        $this->transport->setFrom($from);
    }

Usage Example

示例#1
0
 public function testFrom()
 {
     $transport = new Transport(null, null, null);
     $hippy = new Hippy($transport);
     $this->assertNull($hippy->getFrom());
     $hippy->setFrom('rcrowe');
     $this->assertEquals($hippy->getFrom(), 'rcrowe');
     $transport = new Transport(null, null, 'vivalacrowe');
     $hippy = new Hippy($transport);
     $this->assertEquals($hippy->getFrom(), 'vivalacrowe');
 }