mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed up strange code formatting. Now in line with coding conventions at doc.silverstripe.com/doku.php?id=coding-conventions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43645 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6d5a49e59e
commit
fdddb348c3
@ -12,6 +12,7 @@
|
|||||||
* ));
|
* ));
|
||||||
*/
|
*/
|
||||||
class ArrayData extends ViewableData {
|
class ArrayData extends ViewableData {
|
||||||
|
|
||||||
protected $array;
|
protected $array;
|
||||||
|
|
||||||
public function __construct($array) {
|
public function __construct($array) {
|
||||||
@ -19,15 +20,17 @@ class ArrayData extends ViewableData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getField($f) {
|
public function getField($f) {
|
||||||
if(is_array($this->array[$f]))
|
if(is_array($this->array[$f])) {
|
||||||
return new ArrayData($this->array[$f]);
|
return new ArrayData($this->array[$f]);
|
||||||
|
} else {
|
||||||
else
|
|
||||||
return $this->array[$f];
|
return $this->array[$f];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function hasField($f) {
|
public function hasField($f) {
|
||||||
return isset($this->array[$f]);
|
return isset($this->array[$f]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user