3

Zend フレームワークでオブジェクトを作成しようとしましvar_dumpた。Zend_Controller_Request_Http

出力は以下のとおりです。

object(Zend_Controller_Request_Http)[14]
  protected '_paramSources' => 
    array (size=2)
      0 => string '_GET' (length=4)
      1 => string '_POST' (length=5)
  protected '_requestUri' => string '/' (length=1)
  protected '_baseUrl' => string '' (length=0)
  protected '_basePath' => null
  protected '_pathInfo' => string '/' (length=1)
  protected '_params' => 
    array (size=3)
      'controller' => string 'index' (length=5)
      'action' => string 'index' (length=5)
      'module' => string 'default' (length=7)
  protected '_rawBody' => null
  protected '_aliases' => 
    array (size=0)
      empty
  protected '_dispatched' => boolean true
  protected '_module' => string 'default' (length=7)
  protected '_moduleKey' => string 'module' (length=6)
  protected '_controller' => string 'index' (length=5)
  protected '_controllerKey' => string 'controller' (length=10)
  protected '_action' => string 'index' (length=5)
  protected '_actionKey' => string 'action' (length=6)

最初の行に があり[14]ますが、その数字の意味は何ですか?

PHPのマニュアルを調べましたが、説明が見つかりませんでした。

4

1 に答える 1

0

いいえ、「このオブジェクトのプロパティの数」ではありません

以下のコードを試しました:

class testc
{
    protected $a;
    protected $b;
    private $c;
    private $d;
    public $e;
    public $f;
}

$a=new testc();
var_dump($a);

出力は次のとおりです。

object(testc)[1]
  protected 'a' => null
  protected 'b' => null
  private 'c' => null
  private 'd' => null
  public 'e' => null
  public 'f' => null
于 2013-09-07T05:52:53.217 に答える