source: temp/branches/mobile/data/module/Net/UserAgent/Mobile/NonMobile.php @ 11456

Revision 11456, 3.7 KB checked in by rebelt, 17 years ago (diff)

PEAR Net_UserAgent_Mobile 0.30.0 をインポートしました。

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