original_string: public static function setCookieHeaders($cookies)
      {
          if (!empty($cookies) && is_array($cookies) && false === headers_sent() && !self::isTest()) {
              foreach ($cookies as $cookie) {
                  setcookie($cookie["name"],
                      $cookie["value"],
                      (array_key_exists('expire', $cookie)) ? $cookie["expire"] : NULL,
                      (array_key_exists('path', $cookie)) ? $cookie["path"] : "/",
                      (array_key_exists('domain', $cookie)) ? $cookie["domain"] : Request::getInstance()->getRootUrl(FALSE),
                      (array_key_exists('secure', $cookie)) ? $cookie["secure"] : FALSE,
                      (array_key_exists('http', $cookie)) ? $cookie["http"] : true
                  );
              }
          }
      }
code: public static function setCookieHeaders($cookies)
      {
          if (!empty($cookies) && is_array($cookies) && false === headers_sent() && !self::isTest()) {
              foreach ($cookies as $cookie) {
                  setcookie($cookie["name"],
                      $cookie["value"],
                      (array_key_exists('expire', $cookie)) ? $cookie["expire"] : NULL,
                      (array_key_exists('path', $cookie)) ? $cookie["path"] : "/",
                      (array_key_exists('domain', $cookie)) ? $cookie["domain"] : Request::getInstance()->getRootUrl(FALSE),
                      (array_key_exists('secure', $cookie)) ? $cookie["secure"] : FALSE,
                      (array_key_exists('http', $cookie)) ? $cookie["http"] : true
                  );
              }
          }
      }
code_tokens: public static function setCookieHeaders ( $ cookies ) { if ( ! empty ( $ cookies ) && is_array ( $ cookies ) && false === headers_sent ( ) && ! self :: isTest ( ) ) { foreach ( $ cookies as $ cookie ) { setcookie ( $ cookie [ "name" ] , $ cookie [ "value" ] , ( array_key_exists ( 'expire' , $ cookie ) ) ? $ cookie [ "expire" ] : NULL , ( array_key_exists ( 'path' , $ cookie ) ) ? $ cookie [ "path" ] : "/" , ( array_key_exists ( 'domain' , $ cookie ) ) ? $ cookie [ "domain" ] : Request :: getInstance ( ) -> getRootUrl ( FALSE ) , ( array_key_exists ( 'secure' , $ cookie ) ) ? $ cookie [ "secure" ] : FALSE , ( array_key_exists ( 'http' , $ cookie ) ) ? $ cookie [ "http" ] : true ) ; } } }
docstring: Method that sets the cookie headers
  @param $cookies
docstring_tokens: Method that sets the cookie headers