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


PHP type::toArray方法代码示例

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


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

示例1: areImagesValid

 public function areImagesValid(ExecutionContext $context)
 {
     $captured_ids = array_map(function ($image) {
         return $image->getId();
     }, $this->images->toArray());
     $property_path = $context->getPropertyPath() . '.images';
     if (!count($captured_ids)) {
         $context->addViolationAt($property_path, 'Please select at least one image!', array(), null);
         return;
     }
     $count = $this->query_builder->andWhere($this->query_builder->expr()->in('i.id', $captured_ids))->select('COUNT(i.id)')->getQuery()->getSingleScalarResult();
     if (!$count) {
         $context->addViolation('Please select images from the list!', array(), null);
     }
 }
开发者ID:rodgermd,项目名称:mura-show.com,代码行数:15,代码来源:BulkImages.php

示例2: saveSettings

 /**
  * 
  * @param type $params
  */
 public static function saveSettings($params)
 {
     $oPlugin = JchPlatformPlugin::getPlugin();
     $oPlugin->params = $params->toArray();
     $oData = new JRegistry($oPlugin);
     $aData = $oData->toArray();
     $oController = new JControllerLegacy();
     $oController->addModelPath(JPATH_ADMINISTRATOR . '/components/com_plugins/models', 'PluginsModel');
     $oPluginModel = $oController->getModel('Plugin', 'PluginsModel');
     if ($oPluginModel->save($aData) === FALSE) {
         JchOptimizeLogger::log(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', $oPluginModel->getError()), $params);
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:17,代码来源:plugin.php

示例3: streamWMS

 /**
  * Stream WMS tiles for $feature in high resolution
  * or in low resolution if $lowResolution is set to true
  * 
  * @param type $feature
  * @param type $lowResolution
  */
 public function streamWMS($feature, $lowResolution = false)
 {
     /*
      * Easy case - no feature or no WMS
      */
     if (!isset($feature)) {
         RestoLogUtil::httpError(404);
     }
     $featureArray = $feature->toArray();
     if (!isset($featureArray['properties']['wmsInfos'])) {
         RestoLogUtil::httpError(404);
     }
     $this->stream($this->getWMSUrl($featureArray['properties']['wmsInfos'], $lowResolution));
 }
开发者ID:rmourembles,项目名称:resto,代码行数:21,代码来源:RestoWMSUtil.php

示例4: mapNode

 /**
  * Node mapper
  * 
  * @param type $config
  * @return \Core\Plugins\Navigation\Node
  */
 public function mapNode($config)
 {
     $node = new Node();
     $allData = $config->toArray();
     foreach ($allData as $key => $value) {
         if ($key == 'childs') {
             continue;
         }
         $node->{'set' . ucfirst($key)}($value);
     }
     if (isset($config->childs)) {
         $collection = $this->mapCollection($config->childs, $node);
         $node->setChilds($collection);
     }
     return $node;
 }
开发者ID:zedmaster,项目名称:ticobox,代码行数:22,代码来源:Navigation.php

示例5: retrieveDefinitionData

 /**
  * @param $id
  * @return array
  * @codeCoverageIgnore
  */
 public function retrieveDefinitionData($id)
 {
     $this->definitionBean->retrieve($id);
     return $this->definitionBean->toArray();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:10,代码来源:PMSEEndSendMessageEvent.php


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