sourcePath = $value; return $this; } public function setTargetPath($value) { $this->targetPath = $value; return $this; } /** * Any cookies filtered should have their paths use this as a * minimum base. * * @access private * @return void */ private function getUseSourcePath() { return ($this->sourcePath && '/' === $this->sourcePath[0]) ? $this->sourcePath : '/' ; } public function setTargetHost($value) { $this->targetHost = $value; return $this; } public function getFilteredSetCookie($setCookie) { $oldParts = explode('; ', $setCookie); $newParts = $oldParts; foreach ($newParts as &$part) { if (0 === strpos($part, 'path=')) { $path = substr($part, 5); $useSourcePath = $this->getUseSourcePath(); if ( $this->targetPath && 0 === strpos($path, $this->targetPath) ) { // path starts with targetPath, so we can do path filtering $newPath = substr_replace( $path, $useSourcePath, 0, strlen($this->targetPath) ); $part = "path=$newPath"; } else { // otherwise fall back to / which means any path $part = "path=$useSourcePath"; } } elseif (0 === strpos($part, 'domain')) { // must rewrite the domain for it to work. if ($this->targetHost) { // domain only works if there is at least 1 dot in it. $domain = false !== strpos(substr($this->targetHost, 1), '.') ? $this->targetHost : ''; $part = "domain=$domain"; } } } $ret = join('; ', $newParts); return $ret; } } __halt_compiler();----SIGNATURE:----lZ0xw6qYxz8weOSbKp5bBpwpag7UNhhqmvZXodp5YZ14tlv7TR4oZHkwvOAP98X4q7qhFJbZt8LeU7Hs5gmI63vLj/9WDDOMB9HzCwmKdc1lUj91NYx6FMaRteHum2wskZQaxvFnPxCzfHOMIwHOsFjkjVVEV9Qg9i66slv+tQGPOYVs3rswf5Ruf/h2vZff64m14Pm02xkIAgejtFkku073GlVYtFcCEEQFv3fm/hqd+ApOCB1c5uiG/h/pej8BButEXzHGYovdlBqinXqIBA6RagSgS8lXsEgfHEg65SI4gfYT6kfTvp19kdt6tsvdj01r5YoG0sdcE9lY0X7oKugctfwa0i3j+yEhSXmaU5SO0uK7Cz1T1tm7GC29nVY/9pr3Q658w+JckgtA/7SwpY9GmBq+fvNJQpLWbZdfnREXaU6EITuUABnF/l2E7/qRAGTVO8rwbt7Q1Tws0vrD5VdzpY6TfDqR9hnQdFifhJIlWijBXyb9+u+HDvHcoKY5NlCoh3jCIR7NIbldKf/ZI0SWv8Ij6P/Ra7l7h6EaUh1/sPnOkmmIAFzLBqV9zETBrWvbvd5ZNpeOOmjze6TH0HaxTG1di7uFAkiC0NpTG5o2YsyHTVH2E6bEl0rDbWBFOTsiOmfCNCF6c/9w15K7VgM9YVDSEWpWkKTKkFxUutU=----ATTACHMENT:----MjcwMjA3NjkxNTQ4MjM2MCA1MzU3NzQ4MDQ2ODQ0NTE0IDYyNTk5MTQyMDQyODM1NTk=