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


PHP Utils::arrayValuesCheck方法代码示例

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


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

示例1: create

 /**
  * Create a new Binding for the dashboard.
  *
  * @param  mixed $arg1 One or array of many ControlWrappers
  * @param  mixed $arg2 One or array of many ChartWrappers
  * @throws \Khill\Lavacharts\Exceptions\InvalidBindings
  * @return \Khill\Lavacharts\Dashboards\Bindings\Binding
  */
 public static function create($arg1, $arg2)
 {
     $chartWrapperArrayCheck = Utils::arrayValuesCheck($arg2, 'class', 'ChartWrapper');
     $controlWrapperArrayCheck = Utils::arrayValuesCheck($arg1, 'class', 'ControlWrapper');
     if ($arg1 instanceof ControlWrapper && $arg2 instanceof ChartWrapper) {
         return new OneToOne($arg1, $arg2);
     } elseif ($arg1 instanceof ControlWrapper && $chartWrapperArrayCheck) {
         return new OneToMany($arg1, $arg2);
     } elseif ($controlWrapperArrayCheck && $arg2 instanceof ChartWrapper) {
         return new ManyToOne($arg1, $arg2);
     } elseif ($controlWrapperArrayCheck && $chartWrapperArrayCheck) {
         return new ManyToMany($arg1, $arg2);
     } else {
         throw new InvalidBindings();
     }
 }
开发者ID:sekouzed,项目名称:lavacharts,代码行数:24,代码来源:BindingFactory.php

示例2: colors

 /**
  * The colors to use for the chart elements.
  *
  * An array of strings, where each element is an HTML color string
  * for example:['red','#004411']
  *
  *
  * @access public
  * @param  array $colorArray
  * @return \Khill\Lavacharts\Charts\Chart
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function colors($colorArray)
 {
     if (Utils::arrayValuesCheck($colorArray, 'string') === false) {
         throw new InvalidConfigValue(static::TYPE . '->' . __FUNCTION__, 'array', 'with valid HTML colors');
     }
     return $this->setOption(__FUNCTION__, $colorArray);
 }
开发者ID:robertdac,项目名称:sistema_gestion_social,代码行数:19,代码来源:Chart.php

示例3: vAxes

 /**
  * Specifies properties for individual vertical axes
  *
  * If the chart has multiple vertical axes. Each child object is a vAxis object,
  * and can contain all the properties supported by vAxis.
  * These property values override any global settings for the same property.
  *
  * To specify a chart with multiple vertical axes, first define a new axis using
  * series.targetAxisIndex, then configure the axis using vAxes.
  *
  * @param  array              $a Array of VerticalAxis objects
  * @throws InvalidConfigValue
  *
  * @return AreaChart
  */
 public function vAxes($a)
 {
     if (Utils::arrayValuesCheck($a, 'class', 'VerticalAxis')) {
         return $this->addOption(array(__FUNCTION__ => $a));
     } else {
         throw $this->invalidConfigValue(__FUNCTION__, 'array', 'of VerticalAxis Objects');
     }
 }
开发者ID:alvarobfdev,项目名称:applog,代码行数:23,代码来源:AreaChart.php

示例4: addColumnFromArray

 /**
  * Supplemental function to add columns from an array.
  *
  * @param  array                   $colDefArray
  * @throws InvalidColumnDefinition
  * @return DataTable
  */
 private function addColumnFromArray($colDefArray)
 {
     if (Utils::arrayValuesCheck($colDefArray, 'string') && Utils::between(1, count($colDefArray), 4, true)) {
         call_user_func_array(array($this, 'addColumnFromStrings'), $colDefArray);
     } else {
         throw new InvalidColumnDefinition($colDefArray);
     }
     return $this;
 }
开发者ID:alienwizard,项目名称:MediahelpCRM_local,代码行数:16,代码来源:DataTable.php

示例5: colors

 /**
  * The colors to use for the chart elements. An array of strings, where each
  * element is an HTML color string, for example: colors:['red','#004411'].
  *
  * @param  array              $cArr
  * @throws InvalidConfigValue
  *
  * @return Chart
  */
 public function colors($cArr)
 {
     if (Utils::arrayValuesCheck($cArr, 'string')) {
         return $this->addOption(array(__FUNCTION__ => $cArr));
     } else {
         throw $this->invalidConfigValue(__FUNCTION__, 'array', 'with valid HTML colors');
     }
 }
开发者ID:peter-draznik,项目名称:lavacharts,代码行数:17,代码来源:Chart.php

示例6: colors

 /**
  * Colors to assign to values in the visualization. An array of strings,
  * where each element is an HTML color string.
  *
  * For example: ['red', '#004411']
  * You must have at least two values; the gradient will include all your
  * values, plus calculated intermediary values, with the first color as the
  * smallest value, and the last color as the highest.
  *
  * @param  array $colors
  * @return \Khill\Lavacharts\Configs\ColorAxis
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function colors($colors)
 {
     if (is_array($colors) === false || count($colors) <= 1 || Utils::arrayValuesCheck($colors, 'string') === false) {
         throw new InvalidConfigValue(__FUNCTION__, 'array', 'with a minimum of two strings representing html colors.');
     }
     return $this->setOption(__FUNCTION__, $colors);
 }
开发者ID:tahertechs,项目名称:lavacharts,代码行数:20,代码来源:ColorAxis.php

示例7: testArrayValuesCheckWithBadParams

 /**
  * @dataProvider badParamsProvider
  */
 public function testArrayValuesCheckWithBadParams($badData, $testType, $extra = '')
 {
     $this->assertFalse(Utils::arrayValuesCheck($badData, $testType, $extra));
 }
开发者ID:alvarobfdev,项目名称:applog,代码行数:7,代码来源:UtilsArrayValuesTest.php

示例8: formatColumns

 /**
  * Sets the format of multiple columns.
  *
  * @access public
  * @param  array $colFormatArr
  * @return \Khill\Lavacharts\DataTables\DataTable
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function formatColumns($colFormatArr)
 {
     if (Utils::arrayValuesCheck($colFormatArr, 'class', 'Format') === false) {
         throw new InvalidConfigValue('DataTable->' . __FUNCTION__, 'array', 'Where the keys are column indices and the values Format objects');
     }
     foreach ($colFormatArr as $index => $format) {
         $this->formatColumn($index, $format);
     }
     return $this;
 }
开发者ID:sekouzed,项目名称:lavacharts,代码行数:18,代码来源:DataTable.php

示例9: lineDashStyle

 /**
  * Many styles of dashed lines are possible via the lineDashStyle option, which takes an array of numbers.
  *
  * The first number indicates the length of a dash, and the second indicates the gap after it.
  * If there is a third number, that's the length of the next dash, and a fourth number, if present,
  * is the length of the next gap.
  *
  * When the chart is drawn, these lengths are repeated, so [4, 4] means a succession of 4-length dashes
  * and 4-length gaps. [5, 1, 3] means a 5-length dash, a 1-length gap, a 3-length dash, a 5-length gap, and so on.
  *
  *
  * @param array $lineDashStyle
  * @return \Khill\Lavacharts\Configs\Series
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function lineDashStyle($lineDashStyle)
 {
     if (Utils::arrayValuesCheck($lineDashStyle, 'int') === false) {
         throw new InvalidConfigValue(static::TYPE . '->' . __FUNCTION__, 'array', 'of integers');
     }
     return $this->setOption(__FUNCTION__, $lineDashStyle);
 }
开发者ID:tahertechs,项目名称:lavacharts,代码行数:22,代码来源:Series.php

示例10: colors

 /**
  * Colors to assign to values in the visualization. An array of strings,
  * where each element is an HTML color string.
  *
  * For example: $this->colors = array('red', '#004411')
  * You must have at least two values; the gradient will include all your
  * values, plus calculated intermediary values, with the first color as the
  * smallest value, and the last color as the highest.
  *
  * @param  array              $colors
  * @throws InvalidConfigValue
  * @return ColorAxis
  */
 public function colors($colors)
 {
     if (is_array($colors) && Utils::arrayValuesCheck($colors, 'string') && count($colors) > 1) {
         $this->colors = $colors;
     } else {
         throw new InvalidConfigValue(__FUNCTION__, 'array', 'minimum of two, with values as html color strings');
     }
     return $this;
 }
开发者ID:alvarobfdev,项目名称:applog,代码行数:22,代码来源:ColorAxis.php


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