1 | <?php |
||
25 | class Visitor extends ActiveRecord |
||
26 | { |
||
27 | /** |
||
28 | * The table alias |
||
29 | */ |
||
30 | const TABLE_ALIAS = 'hubspot_visitors'; |
||
31 | |||
32 | /** |
||
33 | * Request to HubSpot has been performed and contact results have been saved. |
||
34 | */ |
||
35 | const STATUS_SUCCESSFUL = 'successful'; |
||
36 | |||
37 | /** |
||
38 | * Request to HubSpot has not been made; Likely new and has not been processed. |
||
39 | */ |
||
40 | const STATUS_PENDING = 'pending'; |
||
41 | |||
42 | /** |
||
43 | * A HubSpot error was returned; Further investigation is needed. |
||
44 | */ |
||
45 | const STATUS_ERROR = 'error'; |
||
46 | |||
47 | /** |
||
48 | * The HubSpot contact could not be found. |
||
49 | */ |
||
50 | const STATUS_NOT_FOUND = 'not_found'; |
||
51 | |||
52 | /** |
||
53 | * Set a default status |
||
54 | * |
||
55 | * @inheritDoc |
||
56 | */ |
||
57 | public function init() |
||
64 | |||
65 | /** |
||
66 | * @param string $token |
||
67 | * @param string|null $connection |
||
68 | * @return Visitor |
||
69 | */ |
||
70 | public static function findOrCreate(string $token, string $connection = null): Visitor |
||
82 | |||
83 | /** |
||
84 | * Identify if there is a job that has yet to be processed. |
||
85 | * @return bool |
||
86 | */ |
||
87 | public function inQueue(): bool |
||
96 | |||
97 | /** |
||
98 | * @return Query |
||
99 | */ |
||
100 | public function getQueueJobs(): Query |
||
111 | } |
||
112 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.