Свойство | Type | Description | |
---|---|---|---|
$hashtags | Hashtags to include in the Tweet | ||
$in_reply_to | Parent Tweet identifier | ||
$related | May be presented as a suggested account to follow after the Tweet is published | ||
$text | Pre-populated Tweet text | ||
$url | Share a URL | ||
$validate_inputs | Validate passed variables before storing | ||
$via | Associate a Tweet with an source Twitter account such as the username of your website |
Méthode | Description | |
---|---|---|
addHashtag ( string $hashtag ) : __CLASS__ | Add a hashtag | |
addRelated ( string $username, string $label = '' ) : __CLASS__ | Add a related Twitter account | |
disableValidation ( ) : __CLASS__ | Do not validate inputs | |
enableValidation ( ) : __CLASS__ | Validate inputs | |
fromArray ( array $values ) : __CLASS__ | Construct a new Tweet intent object from an options array | |
getHashtags ( ) : array | Get a list of hashtags stored for the Tweet | |
getIntentURL ( ) : string | Tweet intent URL | |
getRelated ( ) : array | Get related Twitter usernames | |
getVia ( ) : string | Get the stored via value | |
isHTTPURL ( string $url ) : boolean | Is the passed URL an absolute URL using the HTTP or HTTPS scheme? | |
setInReplyTo ( string $tweet_id ) : __CLASS__ | Define a parent Tweet by ID | |
setText ( string $text ) : __CLASS__ | Pre-populate Tweet text | |
setURL ( string $url ) : __CLASS__ | Share a URL | |
setVia ( string $username ) : __CLASS__ | Associate Tweet with a source account | |
shouldValidate ( ) : boolean | Should data be validated before setting? | |
toQueryParameters ( ) : array | Convert parameters into an array prepped for use in query parameters (underscores) or data-* attributes (dashed) |
public addHashtag ( string $hashtag ) : __CLASS__ | ||
$hashtag | string | hashtag |
Résultat | __CLASS__ | support chaining |
public addRelated ( string $username, string $label = '' ) : __CLASS__ | ||
$username | string | Twitter username |
$label | string | brief description of how the account relates to the Tweet content |
Résultat | __CLASS__ | support chaining |
public disableValidation ( ) : __CLASS__ | ||
Résultat | __CLASS__ | support chaining |
public enableValidation ( ) : __CLASS__ | ||
Résultat | __CLASS__ | support chaining |
public getHashtags ( ) : array | ||
Résultat | array | hashtags { @type string hashtag } |
public getIntentURL ( ) : string | ||
Résultat | string | Tweet intent URL with query parameters |
public getRelated ( ) : array | ||
Résultat | array | { @type string username in lowercase @type string description of how the username relates to Tweet content } |
public setInReplyTo ( string $tweet_id ) : __CLASS__ | ||
$tweet_id | string | Parent Tweet ID |
Résultat | __CLASS__ | support chaining |
public shouldValidate ( ) : boolean | ||
Résultat | boolean | validate inputs |
public toQueryParameters ( ) : array | ||
Résultat | array | Tweet parameters { @type string Tweet parameter @type string parameter value } |
protected $validate_inputs |