Ejemplo n.º 1
0
 /**
  * Return a subset of a domain-matching cookies that also match a specified path
  *
  * Returned array is actually an array of pointers to items in the $passed array.
  *
  * @param array $dom_array
  * @param string $path
  * @return array
  */
 protected function _matchPath($domains, $path)
 {
     $ret = array();
     foreach ($domains as $dom => $paths_array) {
         foreach (array_keys($paths_array) as $cpath) {
             if (EHttpCookie::matchCookiePath($cpath, $path)) {
                 if (!isset($ret[$dom])) {
                     $ret[$dom] = array();
                 }
             }
             $ret[$dom][$cpath] = $paths_array[$cpath];
         }
     }
     return $ret;
 }