-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from t3ko/tracking-service
Implement tracking service
- Loading branch information
Showing
31 changed files
with
1,913 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace T3ko\Dpd\Objects\Enum; | ||
|
||
final class TrackingEventsCount | ||
{ | ||
private static $all; | ||
private static $onlyLast; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $value; | ||
|
||
private function __construct($value) | ||
{ | ||
$this->value = $value; | ||
} | ||
|
||
public static function ALL(): TrackingEventsCount | ||
{ | ||
if (null === static::$all) { | ||
static::$all = new static('ALL'); | ||
} | ||
|
||
return static::$all; | ||
} | ||
|
||
public static function ONLY_LAST(): TrackingEventsCount | ||
{ | ||
if (null === static::$onlyLast) { | ||
static::$onlyLast = new static('ONLY_LAST'); | ||
} | ||
|
||
return static::$onlyLast; | ||
} | ||
|
||
public function __toString() | ||
{ | ||
return $this->value; | ||
} | ||
} |
Oops, something went wrong.