Anant Narayanan avatar Anant Narayanan committed 32a4d41

Move Net_9P_Qid/Stat to Net_9P_Base

Comments (0)

Files changed (5)

Net_9P/9P/Base.php

      * Encodes a Qid into the 9P format
      *
      * @access  private
-     * @param   Net_9P_Qid  $value  Qid to encode
+     * @param   Net_9P_Base_Qid  $value  Qid to encode
      */
     private function encodeQid($value)
     {
         $nIndex = $this->decodeInteger($value, $nIndex, 8);
         $path = $this->buffer[-1];
 
-        $qid = new Net_9P_Qid($qType, $version, $path);
+        $qid = new Net_9P_Base_Qid($qType, $version, $path);
         array_splice($this->buffer, -3, 3, $qid);
 
         return $nIndex;
      * Encodes an Rwalk 9P message
      *
      * @access  private
-     * @param   Array   $qids   An array of Net_9P_Qid objects
+     * @param   Array   $qids   An array of Net_9P_Base_Qid objects
      */
     private function encodeRwalk($qids)
     {
      * Encode a Stat 9P message
      *
      * @access  private
-     * @param   Array   $stats   An array of Net_9P_Stat objects
+     * @param   Array   $stats   An array of Net_9P_Base_Stat objects
      */
     private function encodeStat($stats)
     {
             $nIndex = $this->decodeString($value, $nIndex, 2);
             $muid = $this->buffer[-1];
 
-            $stats[] = new Net_9P_Stat($type, $dev, $qid, $mode, $atime, $mtime,
-                                       $len, $name, $uid, $gid, $muid);
+            $stats[] = new Net_9P_Base_Stat($type, $dev, $qid, $mode, $atime, $mtime,
+                                            $len, $name, $uid, $gid, $muid);
             
             array_splice($this->buffer, -12);
         }

Net_9P/9P/Base/Qid.php

+<?php
+
+/**
+ * PEAR::Net_9P_Base_Qid
+ *
+ * This class represents a Qid, used in the
+ * 9P Protocol.
+ *
+ * @category  Net
+ * @package   Net_9P
+ * @version   1.0
+ * @author    Anant Narayanan <anant@php.net>
+ * @copyright 2007 Anant Narayanan <anant@php.net>
+ * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
+ */
+
+class Net_9P_Base_Qid
+{
+    // {{{ properties
+    
+    /**
+     * Qid type
+     *
+     * @var int
+     * @access public
+     */
+    public $qType;
+
+    /**
+     * Qid version for a given path
+     *
+     * @var int
+     * @access public
+     */
+    public $version;
+
+    /**
+     * Server's unique identification for the associated file
+     *
+     * @var int
+     * @access public
+     */
+    public $path;
+
+    // }}}
+    // {{{ __construct()
+
+    /**
+     * Sets the class properties
+     *
+     * @access  public
+     * @param   int     $type       Qid type
+     * @param   int     $version    Qid version for a given path
+     * @param   int     $path       Server's unique identification for the associated file
+     */
+    public function __construct($type, $version, $path)
+    {
+        $this->qType = $type;
+        $this->version = $version;
+        $this->path = $path;
+    }
+
+    // }}}
+}
+
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

Net_9P/9P/Base/Stat.php

+<?php
+
+/**
+ * PEAR::Net_9P_Base_Stat
+ *
+ * This class represents a Stat, used in the
+ * 9P Protocol.
+ *
+ * @category  Net
+ * @package   Net_9P
+ * @version   1.0
+ * @author    Anant Narayanan <anant@php.net>
+ * @copyright 2007 Anant Narayanan <anant@php.net>
+ * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
+ */
+
+class Net_9P_Base_Stat
+{
+    // {{{ properties
+    
+    /**
+     * sType: For kernel use
+     *
+     * @var int
+     * @access public
+     */
+    public $sType;
+
+    /**
+     * dev: For kernel use
+     *
+     * @var int
+     * @access public
+     */
+    public $dev;
+
+    /**
+     * Qid associated with the stat
+     *
+     * @var Net_9P_Qid
+     * @access public
+     */
+    public $qid;
+
+    /**
+     * File Mode
+     *
+     * @var int
+     * @access public
+     */
+    public $mode;
+
+    /**
+     * Last access time
+     *
+     * @var int
+     * @access public
+     */
+    public $atime;
+
+    /**
+     * Last modification time
+     *
+     * @var int
+     * @access public
+     */
+    public $mtime;
+
+    /**
+     * Length of file in bytes
+     *
+     * @var int
+     * @access public
+     */
+    public $length;
+
+    /**
+     * File name
+     * Is '/' if file is root of 9P server
+     *
+     * @var String
+     * @access public
+     */
+    public $sName;
+
+    /**
+     * Owner name
+     *
+     * @var String
+     * @access public
+     */
+    public $uid;
+
+    /**
+     * Group name
+     *
+     * @var String
+     * @access public
+     */
+    public $gid;
+
+    /**
+     * Name of user who last modified the file 
+     *
+     * @var String
+     * @access public
+     */
+    public $muid;
+
+    // }}}
+    // {{{ __construct()
+
+    /**
+     * Sets the class properties
+     *
+     * @access  public
+     * @param   int         $type       sType: For kernel use
+     * @param   int         $dev        dev: For kernel use
+     * @param   Net_9P_Qid  $qid        Qid associated with the stat
+     * @param   int         $mode       File mode
+     * @param   int         $atime      Last access time
+     * @param   int         $mtime      Last modification time
+     * @param   int         $length     Length of file in bytes
+     * @param   String      $name       Name of file
+     * @param   String      $uid        Owner name
+     * @param   String      $gid        Group name
+     * @param   String      $muid       Name of user who last modified the file
+     */
+    public function __construct($type, $dev, $qid, $mode, $atime, $mtime, $length, $name, $uid, $gid, $muid)
+    {
+        $this->sType = $type;
+        $this->dev = $dev;
+        $this->qid = $qid;
+        $this->mode = $mode;
+        $this->atime = $atime;
+        $this->mtime = $mtime;
+        $this->length = $length;
+        $this->sName = $name;
+        $this->uid = $uid;
+        $this->gid = $gid;
+        $this->muid = $muid;
+    }
+
+    // }}}
+}
+
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+

Net_9P/9P/Qid.php

-<?php
-
-/**
- * PEAR::Net_9P_Qid
- *
- * This class represents a Qid, used in the
- * 9P Protocol.
- *
- * @category  Net
- * @package   Net_9P
- * @version   1.0
- * @author    Anant Narayanan <anant@php.net>
- * @copyright 2007 Anant Narayanan <anant@php.net>
- * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
- */
-
-class Net_9P_Qid
-{
-    // {{{ properties
-    
-    /**
-     * Qid type
-     *
-     * @var int
-     * @access public
-     */
-    public $qType;
-
-    /**
-     * Qid version for a given path
-     *
-     * @var int
-     * @access public
-     */
-    public $version;
-
-    /**
-     * Server's unique identification for the associated file
-     *
-     * @var int
-     * @access public
-     */
-    public $path;
-
-    // }}}
-    // {{{ __construct()
-
-    /**
-     * Sets the class properties
-     *
-     * @access  public
-     * @param   int     $type       Qid type
-     * @param   int     $version    Qid version for a given path
-     * @param   int     $path       Server's unique identification for the associated file
-     */
-    public function __construct($type, $version, $path)
-    {
-        $this->qType = $type;
-        $this->version = $version;
-        $this->path = $path;
-    }
-
-    // }}}
-}
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

Net_9P/9P/Stat.php

-<?php
-
-/**
- * PEAR::Net_9P_Stat
- *
- * This class represents a Stat, used in the
- * 9P Protocol.
- *
- * @category  Net
- * @package   Net_9P
- * @version   1.0
- * @author    Anant Narayanan <anant@php.net>
- * @copyright 2007 Anant Narayanan <anant@php.net>
- * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
- */
-
-class Net_9P_Stat
-{
-    // {{{ properties
-    
-    /**
-     * sType: For kernel use
-     *
-     * @var int
-     * @access public
-     */
-    public $sType;
-
-    /**
-     * dev: For kernel use
-     *
-     * @var int
-     * @access public
-     */
-    public $dev;
-
-    /**
-     * Qid associated with the stat
-     *
-     * @var Net_9P_Qid
-     * @access public
-     */
-    public $qid;
-
-    /**
-     * File Mode
-     *
-     * @var int
-     * @access public
-     */
-    public $mode;
-
-    /**
-     * Last access time
-     *
-     * @var int
-     * @access public
-     */
-    public $atime;
-
-    /**
-     * Last modification time
-     *
-     * @var int
-     * @access public
-     */
-    public $mtime;
-
-    /**
-     * Length of file in bytes
-     *
-     * @var int
-     * @access public
-     */
-    public $length;
-
-    /**
-     * File name
-     * Is '/' if file is root of 9P server
-     *
-     * @var String
-     * @access public
-     */
-    public $sName;
-
-    /**
-     * Owner name
-     *
-     * @var String
-     * @access public
-     */
-    public $uid;
-
-    /**
-     * Group name
-     *
-     * @var String
-     * @access public
-     */
-    public $gid;
-
-    /**
-     * Name of user who last modified the file 
-     *
-     * @var String
-     * @access public
-     */
-    public $muid;
-
-    // }}}
-    // {{{ __construct()
-
-    /**
-     * Sets the class properties
-     *
-     * @access  public
-     * @param   int         $type       sType: For kernel use
-     * @param   int         $dev        dev: For kernel use
-     * @param   Net_9P_Qid  $qid        Qid associated with the stat
-     * @param   int         $mode       File mode
-     * @param   int         $atime      Last access time
-     * @param   int         $mtime      Last modification time
-     * @param   int         $length     Length of file in bytes
-     * @param   String      $name       Name of file
-     * @param   String      $uid        Owner name
-     * @param   String      $gid        Group name
-     * @param   String      $muid       Name of user who last modified the file
-     */
-    public function __construct($type, $dev, $qid, $mode, $atime, $mtime, $length, $name, $uid, $gid, $muid)
-    {
-        $this->sType = $type;
-        $this->dev = $dev;
-        $this->qid = $qid;
-        $this->mode = $mode;
-        $this->atime = $atime;
-        $this->mtime = $mtime;
-        $this->length = $length;
-        $this->sName = $name;
-        $this->uid = $uid;
-        $this->gid = $gid;
-        $this->muid = $muid;
-    }
-
-    // }}}
-}
-
-/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
-
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.