当前位置: 首页>>代码示例>>PHP>>正文


PHP Utils::arrayIsMulti方法代码示例

本文整理汇总了PHP中Khill\Lavacharts\Utils::arrayIsMulti方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils::arrayIsMulti方法的具体用法?PHP Utils::arrayIsMulti怎么用?PHP Utils::arrayIsMulti使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Khill\Lavacharts\Utils的用法示例。


在下文中一共展示了Utils::arrayIsMulti方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: trendlines

 /**
  * Defines how the chart trendlines will be displayed.
  *
  * @param  array $trendlineConfigArray
  * @return \Khill\Lavacharts\Charts\Chart
  * @throws \Khill\Lavacharts\Traits\InvalidConfigValue
  */
 public function trendlines($trendlineConfigArray)
 {
     if (Utils::arrayIsMulti($trendlineConfigArray) === false) {
         throw new InvalidConfigValue(static::TYPE . '->' . __FUNCTION__, 'array', 'With arrays of Trendline options.');
     }
     $trendlines = [];
     foreach ($trendlineConfigArray as $index => $trendlineConfig) {
         $trendlines[(string) $index] = new Trendline($trendlineConfig);
     }
     return $this->setOption(__FUNCTION__, $trendlines);
 }
开发者ID:tahertechs,项目名称:lavacharts,代码行数:18,代码来源:TrendlinesTrait.php

示例2: hAxes

 /**
  * Specifies properties for individual horizontal axes, if the chart has multiple horizontal axes.
  * Each child object is a hAxis object, and can contain all the properties supported by hAxis.
  * These property values override any global settings for the same property.
  * To specify a chart with multiple horizontal axes, first define a new axis using series.targetAxisIndex,
  * then configure the axis using hAxes.
  *
  * @param  array $hAxisConfigArray Array of HorizontalAxis configuration arrays
  * @return \Khill\Lavacharts\Charts\Chart
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function hAxes($hAxisConfigArray)
 {
     if (Utils::arrayIsMulti($hAxisConfigArray) === false) {
         throw new InvalidConfigValue(static::TYPE . '->' . __FUNCTION__, 'array', 'With arrays of HorizontalAxis options.');
     }
     $hAxes = [];
     foreach ($hAxisConfigArray as $hAxisConfig) {
         $hAxes[] = new HorizontalAxis($hAxisConfig);
     }
     return $this->setOption(__FUNCTION__, $hAxes);
 }
开发者ID:tahertechs,项目名称:lavacharts,代码行数:22,代码来源:HorizontalAxesTrait.php

示例3: series

 /**
  * An array of objects, each describing the format of the corresponding series
  * in the chart.
  * To use default values for a series, specify an null in the array.
  * If a series or a value is not specified, the global value will be used.
  *
  * @param  array $seriesConfigArray Array of Series options.
  * @return \Khill\Lavacharts\Charts\Chart
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function series($seriesConfigArray)
 {
     if (Utils::arrayIsMulti($seriesConfigArray) === false) {
         throw new InvalidConfigValue(static::TYPE . '->' . __FUNCTION__, 'array', 'With arrays of Series options.');
     }
     $series = [];
     foreach ($seriesConfigArray as $seriesConfig) {
         $series[] = new Series($seriesConfig);
     }
     return $this->setOption(__FUNCTION__, $series);
 }
开发者ID:tahertechs,项目名称:lavacharts,代码行数:21,代码来源:SeriesTrait.php

示例4: slices

 /**
  * An array of slice objects, each describing the format of the
  * corresponding slice in the pie.
  *
  * To use default values for a slice, specify a null. If a slice or a value is not specified,
  * the global value will be used.
  *
  * The values of the array keys will correspond to each numbered piece
  * of the pie, starting from 0. You can skip slices by assigning the
  * keys of the array as (int)s.
  *
  *
  * @param  array $slices Array of slice objects
  * @return \Khill\Lavacharts\Charts\PieChart
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function slices($slices)
 {
     if (Utils::arrayIsMulti($slices) === false) {
         throw new InvalidConfigValue(static::TYPE . '->' . __FUNCTION__, 'array', 'as (int) => (Slice)');
     }
     $pie = [];
     foreach ($slices as $index => $slice) {
         $pie[$index] = $slice;
     }
     return $this->setOption(__FUNCTION__, $pie);
 }
开发者ID:robertdac,项目名称:sistema_gestion_social,代码行数:27,代码来源:PieChart.php

示例5: addRows

 /**
  * Adds multiple rows to the DataTable.
  *
  * @see   addRow()
  * @param array Multi-dimensional array of rows.
  *
  * @return DataTable
  */
 public function addRows($arrayOfRows)
 {
     if (Utils::arrayIsMulti($arrayOfRows)) {
         foreach ($arrayOfRows as $row) {
             $this->addRow($row);
         }
     } else {
         throw new InvalidConfigValue(__FUNCTION__, 'array of arrays');
     }
     return $this;
 }
开发者ID:alienwizard,项目名称:MediahelpCRM_local,代码行数:19,代码来源:DataTable.php

示例6: bindings

 /**
  * Binds controls to the dashobard.
  *
  * Takes an array of with key value pairs of $controlType=>$controlLabels,
  * where $controlLabels is an array of the control labels for each type of control.
  *
  * ex. 
  * 		$controls = ['NumberRangeFilter|StocksOfficialFilter' => ['GoogleTable|StocksTable', 'LineChart|Stocks'] ];
  * alternatively accepted when only one control for a control type: 
  * 		$bindings = ['NumberRangeFilter|StocksOfficialFilter' => 'GoogleTable|StocksTable' ];
  *
  * @param  array                 $controls
  * @throws InvalidConfigProperty
  * @throws InvalidConfigValue
  * @return null
  */
 public function bindings($bindings)
 {
     if (Utils::arrayIsMulti($bindings)) {
         foreach ($bindings as $control => $charts) {
             //or $chart=>controls
             if (is_array($charts) && count($charts) > 0) {
                 foreach ($charts as $chartKey => $chart) {
                     $chartLabel = is_int($chartKey) ? $chart : $chartKey;
                     if ($this->checkBindingOrdering($control)) {
                         $this->makeBinding($control, $chartLabel);
                     } else {
                         //Flipped ordering of [fliter=>chart(s)] to [chart=>filter(s)]
                         $this->makeBinding($chartLabel, $control);
                     }
                 }
             } else {
                 if (is_string($charts) && count($charts) > 0) {
                     if ($this->checkBindingOrdering($control)) {
                         $this->makeBinding($control, $charts);
                     } else {
                         $this->makeBinding($chartLabel, $control);
                     }
                 } else {
                     throw $this->invalidConfigValue(__FUNCTION__, 'array | string');
                 }
             }
         }
     } else {
         throw $this->invalidConfigValue(__FUNCTION__, 'array');
     }
 }
开发者ID:peter-draznik,项目名称:lavacharts,代码行数:47,代码来源:Dashboard.php

示例7: testArrayIsMultiWithNonArray

 /**
  * @dataProvider nonArrayProvider
  */
 public function testArrayIsMultiWithNonArray($notArray)
 {
     $this->assertFalse(Utils::arrayIsMulti($notArray));
 }
开发者ID:alvarobfdev,项目名称:applog,代码行数:7,代码来源:UtilsArrayIsMultiTest.php


注:本文中的Khill\Lavacharts\Utils::arrayIsMulti方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。