Net_UserAgent_Mobile
[ class tree: Net_UserAgent_Mobile ] [ index: Net_UserAgent_Mobile ] [ all elements ]

Source for file NonMobile.php

Documentation is available at NonMobile.php

  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 <kubo@isite.co.jp>                            |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id: NonMobile.php,v 1.9 2005/02/03 08:56:04 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 <kubo@isite.co.jp>
  43.  * @access   public
  44.  * @version  $Revision: 1.9 $
  45.  * @see      Net_UserAgent_Mobile_Common
  46.  */
  47. {
  48.  
  49.     /**#@+
  50.      * @access public
  51.      */
  52.  
  53.     // }}}
  54.     // {{{ isNonMobile()
  55.  
  56.     /**
  57.      * returns true
  58.      *
  59.      * @return boolean 
  60.      */
  61.     function isNonMobile()
  62.     {
  63.         return true;
  64.     }
  65.  
  66.     // }}}
  67.     // {{{ parse()
  68.  
  69.     /**
  70.      * parse HTTP_USER_AGENT string
  71.      */
  72.     function parse()
  73.     {
  74.         @list($this->name$this->version=
  75.             explode('/'$this->getUserAgent());
  76.     }
  77.  
  78.     // }}}
  79.     // {{{ makeDisplay()
  80.  
  81.     /**
  82.      * create a new {@link Net_UserAgent_Mobile_Display} class instance
  83.      *
  84.      * @return object newly created {@link Net_UserAgent_Mobile_Display}
  85.      *      object
  86.      * @see Net_UserAgent_Mobile_Display
  87.      */
  88.     function makeDisplay()
  89.     {
  90.         return new Net_UserAgent_Mobile_Display(null);
  91.     }
  92.  
  93.     // }}}
  94.     // {{{ getModel()
  95.  
  96.     /**
  97.      * returns name of the model
  98.      *
  99.      * @return string 
  100.      */
  101.     function getModel()
  102.     {
  103.         return '';
  104.     }
  105.  
  106.     // }}}
  107.     // {{{ getDeviceID()
  108.  
  109.     /**
  110.      * returns device ID
  111.      *
  112.      * @return string 
  113.      */
  114.     function getDeviceID()
  115.     {
  116.         return '';
  117.     }
  118.  
  119.     // }}}
  120.     // {{{ getCarrierShortName()
  121.  
  122.     /**
  123.      * returns the short name of the carrier
  124.      *
  125.      * @return string 
  126.      */
  127.     function getCarrierShortName()
  128.     {
  129.         return 'N';
  130.     }
  131.  
  132.     // }}}
  133.     // {{{ getCarrierLongName()
  134.  
  135.     /**
  136.      * returns the long name of the carrier
  137.      *
  138.      * @return string 
  139.      */
  140.     function getCarrierLongName()
  141.     {
  142.         return 'NonMobile';
  143.     }
  144.  
  145.     /**#@-*/
  146. }
  147.  
  148. /*
  149.  * Local Variables:
  150.  * mode: php
  151.  * coding: iso-8859-1
  152.  * tab-width: 4
  153.  * c-basic-offset: 4
  154.  * c-hanging-comment-ender-p: nil
  155.  * indent-tabs-mode: nil
  156.  * End:
  157.  */
  158. ?>

Documentation generated on Mon, 11 Mar 2019 14:16:46 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.