本文整理汇总了PHP中FB::setObjectFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP FB::setObjectFilter方法的具体用法?PHP FB::setObjectFilter怎么用?PHP FB::setObjectFilter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FB
的用法示例。
在下文中一共展示了FB::setObjectFilter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: TestObject
$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: _getResult
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: TestObject
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');