Interfaces
- 1 Minute to read
- Print
- DarkLight
Interfaces
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
This section includes the available interfaces with examples.
Methods
setDomain
/**
* @param string $domain Specifies the domain within which this cookie should be presented.
*/
public function setDomain($domain);
getDomain
/**
* @return string Gets the domain name of this cookie.
*/
public function getDomain();
setMaxAge
/**
* Sets the maximum age in seconds for this cookie.
*
* @param integer $expiry Sets the maximum age in seconds for this cookie.
*/
public function setMaxAge($expiry);
getMaxAge
/**
* Gets the maximum age in seconds of this cookie.
*
* @return integer Gets the maximum age in seconds of this cookie.
*/
public function getMaxAge();
setPath
/**
* @param string $uri Specifies a path for the cookie to which the client should return the cookie.
*/
public function setPath($uri);
getPath
/**
* @return string Returns the path on the server to which the browser returns this cookie.
*/
public function getPath();
setSecure
/**
* @param bool $flag Indicates to the browser whether the cookie should only be sent using a secure protocol,
* such as HTTPS or SSL.
*/
public function setSecure($flag);
isSecure
/**
* @return bool Returns true if the browser is sending cookies only over a secure protocol, or false if the browser
* can send cookies using any protocol.
*/
public function isSecure();
getName
/**
* @return string Returns the name of the cookie.
*/
public function getName();
getValue
/**
* @return string Gets the current value of this cookie.
*/
public function getValue();
setHttpOnly
/**
* @param bool $isHttpOnly Marks or unmarks this cookie as HttpOnly.
*/
public function setHttpOnly($isHttpOnly);
isHttpOnly
/**
* @return bool Checks whether this cookie has been marked as HttpOnly.
*/
public function isHttpOnly();
Create your own LoggerClass to debug our Mapp Intelligence PHP library.
Methods
log
/**
* @param string ...$msg Debug message
*/
public function log(...$msg);
Example
class CustomLogger implements MappIntelligenceLogger
{
/**
* @param mixed ...$msg Debug message
*/
public function log(...$msg)
{
error_log(...$msg);
}
}
Create your own ConsumerClass to use for data transfer to Intelligence.
Methods
sendBatch
/**
* @param array $batchContent List of tracking requests
* @return bool
*/
public function sendBatch(array $batchContent);
Example
class TestCustomPrintConsumer implements MappIntelligenceConsumer
{
/**
* @param array $batchContent List of tracking requests
* @return bool
*/
public function sendBatch(array $batchContent) {
for ($i = 0; $i < count($batchContent); $i++) {
echo request[$i] . "\n";
}
return true;
}
}
Was this article helpful?