X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fcontent%2FJsonContent.php;h=40d9277470f82b3385ce43cd32bab5d2c4ef60f4;hb=cfad9f3cbf53d07547e2665c98639ad4e99eead4;hp=8fe88fec22d3c72cc818786aee858a240e697a87;hpb=a85d1b9d0cd7f02111d3a647d5b91e3b1f334563;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/content/JsonContent.php b/includes/content/JsonContent.php index 8fe88fec22..40d9277470 100644 --- a/includes/content/JsonContent.php +++ b/includes/content/JsonContent.php @@ -121,19 +121,19 @@ class JsonContent extends TextContent { */ protected function rootValueTable( $val ) { if ( is_object( $val ) ) { - return self::objectTable( $val ); + return $this->objectTable( $val ); } if ( is_array( $val ) ) { // Wrap arrays in another array so that they're visually boxed in a container. // Otherwise they are visually indistinguishable from a single value. - return self::arrayTable( [ $val ] ); + return $this->arrayTable( [ $val ] ); } return Html::rawElement( 'table', [ 'class' => 'mw-json mw-json-single-value' ], Html::rawElement( 'tbody', [], Html::rawElement( 'tr', [], - Html::element( 'td', [], self::primitiveValue( $val ) ) + Html::element( 'td', [], $this->primitiveValue( $val ) ) ) ) ); @@ -161,7 +161,7 @@ class JsonContent extends TextContent { ); } return Html::rawElement( 'table', [ 'class' => 'mw-json' ], - Html::rawElement( 'tbody', [], join( '', $rows ) ) + Html::rawElement( 'tbody', [], implode( '', $rows ) ) ); } @@ -174,7 +174,7 @@ class JsonContent extends TextContent { */ protected function objectRow( $key, $val ) { $th = Html::element( 'th', [], $key ); - $td = self::valueCell( $val ); + $td = $this->valueCell( $val ); return Html::rawElement( 'tr', [], $th . $td ); } @@ -200,7 +200,7 @@ class JsonContent extends TextContent { ); } return Html::rawElement( 'table', [ 'class' => 'mw-json' ], - Html::rawElement( 'tbody', [], join( "\n", $rows ) ) + Html::rawElement( 'tbody', [], implode( "\n", $rows ) ) ); } @@ -211,7 +211,7 @@ class JsonContent extends TextContent { * @return string HTML. */ protected function arrayRow( $val ) { - $td = self::valueCell( $val ); + $td = $this->valueCell( $val ); return Html::rawElement( 'tr', [], $td ); } @@ -223,14 +223,14 @@ class JsonContent extends TextContent { */ protected function valueCell( $val ) { if ( is_object( $val ) ) { - return Html::rawElement( 'td', [], self::objectTable( $val ) ); + return Html::rawElement( 'td', [], $this->objectTable( $val ) ); } if ( is_array( $val ) ) { - return Html::rawElement( 'td', [], self::arrayTable( $val ) ); + return Html::rawElement( 'td', [], $this->arrayTable( $val ) ); } - return Html::element( 'td', [ 'class' => 'value' ], self::primitiveValue( $val ) ); + return Html::element( 'td', [ 'class' => 'value' ], $this->primitiveValue( $val ) ); } /**