示例#1
0
$obj->child = new TestObject();
$obj->child->child = new TestObject();
$obj->child->child->child = new TestObject();
$obj->child->child->child->child = new TestObject();
$obj->child2 = new TestObject2();
$obj->child2->name4 = 'name 4';
$firephp->setObjectFilter('TestObject2', array('name2', 'name4'));
$firephp->fb($obj);
$array = array();
$array['name'] = 'test data';
$array['child']['name'] = 'test data';
$array['child']['obj'] = $obj;
$array['child']['child']['name'] = 'test data';
$array['child']['child']['child']['name'] = 'test data';
$obj->childArray = $array;
FB::setObjectFilter('TestObject2', array('name2', 'name3'));
$firephp->fb($array);
$table = array();
$table[] = array('Col1', 'Col2');
$table[] = array($obj, $array);
$table[] = array($obj, $array);
$table[] = array($obj, $array);
try {
    test($table);
} catch (Exception $e) {
    $firephp->error($e);
}
function test($table)
{
    FB::table('Test deep table', $table);
    FB::send(array('Test deep table', $table), FirePHP::TABLE);
示例#2
0
    protected function _getResult($key)
    {
        if ($item = $this->cache->load($this->generateCacheKey($key))) {
            return $item;
        }
        throw new Exception('Invalid Key: ' . $key);
    }
    /**
     * @param string $index
     * @return boolean whether the index exists
     **/
    public function offsetExists($index)
    {
        return isset($this->_orderAttributes[$index]) && $this->cache->test($this->generateCacheKey($index));
    }
    public function getTop()
    {
        if (!isset($this->_order[0])) {
            return false;
        }
        try {
            return $this->_getResult($this->_order[0]);
        } catch (Exception $e) {
            return false;
        }
    }
}
//tell firebug not to encode some members
include_once 'FirePHPCore/fb.php';
FB::setObjectFilter('Collection_Cache', array('_orderAttributes', 'cache'));
示例#3
0
    public $publicVar4 = false;
    public $publicVar5 = '';
    public $privateVar2;
    public $privateVar3 = false;
    public $privateVar4 = '';
    private $lotsOfData = "jhsdfjkhsdfjh sdkjhfasjkdhf sakjdhfg skaj dfhsa dfk jhsdfgkjsa dfksadf sadf sadfh\n jksdjhfg sadjkhfsahjdfghja sdfkj sajdfhkgsadfhj sfd jahksdfhjas dfjkahsdfhjasg dfkas df jhasdf ajkshdfgjhkadfs";
}
class TestObject2
{
    var $publicVar = 'Public Var';
    private $privateVar = 'PrivateVar';
}
class TestObject3
{
}
$obj = new TestObject();
$obj2 = new TestObject2();
$obj3 = new TestObject3();
$obj->child = $obj2;
$obj->child2 = $obj3;
$obj->child3 = $obj;
$obj = array('hello' => 'world', 'obj' => $obj, 'last' => 30, array('foo' => 'bar'), array('first', 'second'));
FB::log($obj, 'The object and all its members');
$obj1 = new stdClass();
$obj2 = new stdClass();
$obj1->p = $obj2;
$obj2->p = $obj1;
FB::log($obj1, '$obj1');
FB::setObjectFilter('TestObject', array('publicVar', 'protectedVar', 'privateStaticVar', 'publicStaticVar2'));
FB::setObjectFilter('TestObject2', array('privateVar'));
FB::log($obj, 'The object and all its members');