source: branches/comu-ver2/data/module/Net/UserAgent/Mobile/NonMobile.php @ 17140

Revision 17140, 3.4 KB checked in by adachi, 14 years ago (diff)

merge r17127:17138 (update Net_UserAgent_Mobile)

  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
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-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
17 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
18 * @version    CVS: $Id$
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-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
47 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
48 * @version    Release: 0.31.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     * Parses HTTP_USER_AGENT string.
91     *
92     * @param string $userAgent User-Agent string
93     */
94    function parse($userAgent)
95    {
96        @list($this->name, $this->version) = explode('/', $userAgent);
97    }
98
99    // }}}
100    // {{{ makeDisplay()
101
102    /**
103     * create a new {@link Net_UserAgent_Mobile_Display} class instance
104     *
105     * @return object a newly created {@link Net_UserAgent_Mobile_Display}
106     *     object
107     * @see Net_UserAgent_Mobile_Display
108     */
109    function makeDisplay()
110    {
111        return new Net_UserAgent_Mobile_Display(null);
112    }
113
114    // }}}
115    // {{{ getCarrierShortName()
116
117    /**
118     * returns the short name of the carrier
119     *
120     * @return string
121     */
122    function getCarrierShortName()
123    {
124        return 'N';
125    }
126
127    // }}}
128    // {{{ getCarrierLongName()
129
130    /**
131     * returns the long name of the carrier
132     *
133     * @return string
134     */
135    function getCarrierLongName()
136    {
137        return 'NonMobile';
138    }
139
140    /**#@-*/
141
142    /**#@+
143     * @access private
144     */
145
146    /**#@-*/
147
148    // }}}
149}
150
151// }}}
152
153/*
154 * Local Variables:
155 * mode: php
156 * coding: iso-8859-1
157 * tab-width: 4
158 * c-basic-offset: 4
159 * c-hanging-comment-ender-p: nil
160 * indent-tabs-mode: nil
161 * End:
162 */
Note: See TracBrowser for help on using the repository browser.