本文整理匯總了PHP中Brick::__get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Brick::__get方法的具體用法?PHP Brick::__get怎麽用?PHP Brick::__get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Brick
的用法示例。
在下文中一共展示了Brick::__get方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __get
public function __get($sName)
{
switch ($sName) {
case 'size':
return sizeof(parent::__get('content'));
break;
default:
return parent::__get($sName);
break;
}
}
示例2: __get
public function __get($sName)
{
switch ($sName) {
case 'path':
return dirname(DATA_PATH) . '/' . $this->file;
break;
default:
return parent::__get($sName);
break;
}
}
示例3: __get
public function __get($sName)
{
switch ($sName) {
case 'path':
if (substr($this->src, 0, 4) == 'http') {
return $this->src;
} else {
return '/' . str_replace(ROOT, '', dirname(DATA_PATH)) . '/' . $this->src;
}
break;
default:
return parent::__get($sName);
break;
}
}
示例4: __get
public function __get($sName)
{
switch ($sName) {
case 'targets':
return parent::__get('target');
break;
case 'target':
return implode(', ', parent::__get('target'));
break;
case 'boundary':
if (is_null($this->_sBoundary)) {
$this->_sBoundary = '_----------=_' . md5(uniqid(time()));
}
return $this->_sBoundary;
break;
default:
return parent::__get($sName);
break;
}
}
示例5: __get
public function __get($sName)
{
switch ($sName) {
case 'lat':
return parent::__get('lat') ?: $this->_fDefaultLat;
break;
case 'marker_lat':
return parent::__get('marker_lat') ?: $this->_fDefaultLat;
break;
case 'lng':
return parent::__get('lng') ?: $this->_fDefaultLng;
break;
case 'marker_lng':
return parent::__get('marker_lng') ?: $this->_fDefaultLng;
break;
case 'zoom':
return parent::__get('zoom') ?: $this->_iDefaultZoom;
break;
default:
return parent::__get($sName);
break;
}
}