/** * Protected method to check whether this DSN is supported * * Supported notations: * <pre> * - pop3://localhost * - pop3://user:pass@localhost * - pop3://user@localhost:111 * </pre> * * @param peer.URL * @param array attr * @param int port * @return bool * @throws lang.IllegalArgumentException */ protected function _supports($u, &$attr) { switch (strtolower($u->getScheme())) { case 'pop3': $attr['proto'] = 'pop3'; $attr['port'] = 110; break; default: return parent::_supports($u, $attr); } return TRUE; }
/** * Protected method to check whether this DSN is supported * * Supported notations: * <pre> * - mbox:///usr/home/foo/Mail * </pre> * * @param peer.URL u * @param array attr * @return bool * @throws lang.IllegalArgumentException */ protected function _supports($u, &$attr) { switch (strtolower($u->getScheme())) { case 'mbox': $attr['mbx'] = '/' . $u->getHost() . $u->getPath(); $attr['open'] = TRUE; break; default: return parent::_supports($u, $attr); } return TRUE; }
/** * Protected method to check whether this DSN is supported * * Supported notations: * <pre> * - imap://localhost * - imap://user:pass@localhost * - imap://user@localhost:143 * - imaps://localhost:995/?novalidate-cert=1 * </pre> * * @param peer.URL u * @param array attr * @return bool * @throws lang.IllegalArgumentException */ protected function _supports($u, &$attr) { switch (strtolower($u->getScheme())) { case 'imap': $attr['proto'] = 'imap'; $attr['port'] = 143; break; case 'imaps': $attr['proto'] = 'imap/ssl' . (empty($attr['novalidate-cert']) ? '' : '/novalidate-cert'); $attr['port'] = 993; break; case 'imapt': $attr['proto'] = 'imap/tls' . (empty($attr['novalidate-cert']) ? '' : '/novalidate-cert'); $attr['port'] = 993; break; default: return parent::_supports($u, $attr); } return TRUE; }