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);
PHP

getDomain

/**
 * @return string Gets the domain name of this cookie.
 */
public function getDomain();
PHP

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);
PHP

getMaxAge

/**
 * Gets the maximum age in seconds of this cookie.
 *
 * @return integer Gets the maximum age in seconds of this cookie.
 */
public function getMaxAge();
PHP

setPath

/**
 * @param string $uri Specifies a path for the cookie to which the client should return the cookie.
 */
public function setPath($uri);
PHP

getPath

/**
 * @return string Returns the path on the server to which the browser returns this cookie.
 */
public function getPath();
PHP

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);
PHP

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();
PHP

getName

/**
 * @return string Returns the name of the cookie.
 */
public function getName();
PHP

getValue

/**
 * @return string Gets the current value of this cookie.
 */
public function getValue();
PHP

setHttpOnly

/**
 * @param bool $isHttpOnly Marks or unmarks this cookie as HttpOnly.
 */
public function setHttpOnly($isHttpOnly);
PHP

isHttpOnly

/**
 * @return bool Checks whether this cookie has been marked as HttpOnly.
 */
public function isHttpOnly();
PHP

Create your own LoggerClass to debug our Mapp Intelligence PHP library.

Methods

log

/**
 * @param string ...$msg Debug message
 */
public function log(...$msg);
PHP

Example

class CustomLogger implements MappIntelligenceLogger
{
	/**
     * @param mixed ...$msg Debug message
     */
    public function log(...$msg)
    {
        error_log(...$msg);
    }
}
PHP

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);
PHP

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;
	}
}
PHP