Segment::alias PHP 메소드

alias() 공개 정적인 메소드

Aliases the user id from a temporary id to a permanent one
public static alias ( array $message ) : boolean
$message array
리턴 boolean whether the alias call succeeded
    public static function alias(array $message)
    {
        self::checkClient();
        $userId = !empty($message["userId"]);
        $previousId = !empty($message["previousId"]);
        self::assert($userId && $previousId, "Segment::alias() requires both userId and previousId");
        return self::$client->alias($message);
    }

Usage Example

예제 #1
0
 function testAlias()
 {
     $this->assertTrue(Segment::alias(array("previousId" => "previous-id", "userId" => "user-id")));
 }