English 中文(简体)
如何在实验室中取得物体阵列的价值?
原标题:How to take an object array value in php?
  • 时间:2012-01-12 07:52:34
  •  标签:
  • php
  • basecamp

网址的物体阵列价值

 $obj = new Basecamp($bcUrl, $bcApikey,  X ,  simplexml );

印本

    print_r($obj);

阵列如下:

Basecamp Object
(
    [request:protected] => 
    [baseurl:protected] => https://test.basecamphq.com/
    [format:protected] => simplexml
    [username:protected] => 5d4dsh8745hkf876kjdfhkfsd843ea46a
    [password:protected] => X
    [request_body:protected] => 
)

我想对[基准:受保护的],即获得https://test.basecamphq.com/。 只从这个物体中提取。

最佳回答

[baseurl:protected]系指该物体有一个名为baseurl的财产,其可见度为protected<>。 这意味着你可以具体地从课外直接进入而不是<>>。 查阅这几类文件,看你为什么要查阅。 它可能采用一种方法,例如getBaseurl,使您能够这样做。

问题回答

假设:basecamp-php-api 页: 1

如果不适用,你可以延长<代码>。 a. 为接触受保护成员而设的“基地”/代码”类:

class MyBasecamp extends Basecamp {
   public function getBaseurl() {
      return $this->baseurl;
   }
}

不能取得<代码>底栖/编码>财产的价值。 外部物体,因为protected。 你们需要使用一些老化方法。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...