1 | <?php |
---|
2 | /* vim: set expandtab tabstop=4 shiftwidth=4: */ |
---|
3 | // +----------------------------------------------------------------------+ |
---|
4 | // | PHP version 4 | |
---|
5 | // +----------------------------------------------------------------------+ |
---|
6 | // | Copyright (c) 1997-2004 The PHP Group | |
---|
7 | // +----------------------------------------------------------------------+ |
---|
8 | // | This source file is subject to version 3.0 of the PHP license, | |
---|
9 | // | that is bundled with this package in the file LICENSE, and is | |
---|
10 | // | available through the world-wide-web at the following url: | |
---|
11 | // | http://www.php.net/license/3_0.txt. | |
---|
12 | // | If you did not receive a copy of the PHP license and are unable to | |
---|
13 | // | obtain it through the world-wide-web, please send a note to | |
---|
14 | // | license@php.net so we can mail you a copy immediately. | |
---|
15 | // +----------------------------------------------------------------------+ |
---|
16 | // | Authors: KUBO Atsuhiro <iteman@users.sourceforge.net> | |
---|
17 | // +----------------------------------------------------------------------+ |
---|
18 | // |
---|
19 | // $Id: NonMobile.php,v 1.10 2006/11/07 09:25:14 kuboa Exp $ |
---|
20 | // |
---|
21 | |
---|
22 | require_once(dirname(__FILE__) . '/Common.php'); |
---|
23 | require_once(dirname(__FILE__) . '/Display.php'); |
---|
24 | |
---|
25 | /** |
---|
26 | * Non-Mobile Agent implementation |
---|
27 | * |
---|
28 | * Net_UserAgent_Mobile_NonMobile is a subclass of |
---|
29 | * {@link Net_UserAgent_Mobile_Common}, which implements non-mobile or |
---|
30 | * unimplemented user agents. |
---|
31 | * |
---|
32 | * SYNOPSIS: |
---|
33 | * <code> |
---|
34 | * require_once('Net/UserAgent/Mobile.php'); |
---|
35 | * |
---|
36 | * $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0'; |
---|
37 | * $agent = &Net_UserAgent_Mobile::factory(); |
---|
38 | * </code> |
---|
39 | * |
---|
40 | * @package Net_UserAgent_Mobile |
---|
41 | * @category Networking |
---|
42 | * @author KUBO Atsuhiro <iteman@users.sourceforge.net> |
---|
43 | * @access public |
---|
44 | * @version $Revision: 1.10 $ |
---|
45 | * @see Net_UserAgent_Mobile_Common |
---|
46 | */ |
---|
47 | class Net_UserAgent_Mobile_NonMobile extends Net_UserAgent_Mobile_Common |
---|
48 | { |
---|
49 | |
---|
50 | /**#@+ |
---|
51 | * @access public |
---|
52 | */ |
---|
53 | |
---|
54 | // }}} |
---|
55 | // {{{ isNonMobile() |
---|
56 | |
---|
57 | /** |
---|
58 | * returns true |
---|
59 | * |
---|
60 | * @return boolean |
---|
61 | */ |
---|
62 | function isNonMobile() |
---|
63 | { |
---|
64 | return true; |
---|
65 | } |
---|
66 | |
---|
67 | // }}} |
---|
68 | // {{{ parse() |
---|
69 | |
---|
70 | /** |
---|
71 | * parse HTTP_USER_AGENT string |
---|
72 | */ |
---|
73 | function parse() |
---|
74 | { |
---|
75 | @list($this->name, $this->version) = |
---|
76 | explode('/', $this->getUserAgent()); |
---|
77 | } |
---|
78 | |
---|
79 | // }}} |
---|
80 | // {{{ makeDisplay() |
---|
81 | |
---|
82 | /** |
---|
83 | * create a new {@link Net_UserAgent_Mobile_Display} class instance |
---|
84 | * |
---|
85 | * @return object a newly created {@link Net_UserAgent_Mobile_Display} |
---|
86 | * object |
---|
87 | * @see Net_UserAgent_Mobile_Display |
---|
88 | */ |
---|
89 | function makeDisplay() |
---|
90 | { |
---|
91 | return new Net_UserAgent_Mobile_Display(null); |
---|
92 | } |
---|
93 | |
---|
94 | // }}} |
---|
95 | // {{{ getModel() |
---|
96 | |
---|
97 | /** |
---|
98 | * returns name of the model |
---|
99 | * |
---|
100 | * @return string |
---|
101 | */ |
---|
102 | function getModel() |
---|
103 | { |
---|
104 | return ''; |
---|
105 | } |
---|
106 | |
---|
107 | // }}} |
---|
108 | // {{{ getDeviceID() |
---|
109 | |
---|
110 | /** |
---|
111 | * returns device ID |
---|
112 | * |
---|
113 | * @return string |
---|
114 | */ |
---|
115 | function getDeviceID() |
---|
116 | { |
---|
117 | return ''; |
---|
118 | } |
---|
119 | |
---|
120 | // }}} |
---|
121 | // {{{ getCarrierShortName() |
---|
122 | |
---|
123 | /** |
---|
124 | * returns the short name of the carrier |
---|
125 | * |
---|
126 | * @return string |
---|
127 | */ |
---|
128 | function getCarrierShortName() |
---|
129 | { |
---|
130 | return 'N'; |
---|
131 | } |
---|
132 | |
---|
133 | // }}} |
---|
134 | // {{{ getCarrierLongName() |
---|
135 | |
---|
136 | /** |
---|
137 | * returns the long name of the carrier |
---|
138 | * |
---|
139 | * @return string |
---|
140 | */ |
---|
141 | function getCarrierLongName() |
---|
142 | { |
---|
143 | return 'NonMobile'; |
---|
144 | } |
---|
145 | |
---|
146 | /**#@-*/ |
---|
147 | } |
---|
148 | |
---|
149 | /* |
---|
150 | * Local Variables: |
---|
151 | * mode: php |
---|
152 | * coding: iso-8859-1 |
---|
153 | * tab-width: 4 |
---|
154 | * c-basic-offset: 4 |
---|
155 | * c-hanging-comment-ender-p: nil |
---|
156 | * indent-tabs-mode: nil |
---|
157 | * End: |
---|
158 | */ |
---|
159 | ?> |
---|