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


PHP ArrayCollection::getValues方法代码示例

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


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

示例1: getValues

 public function getValues()
 {
     if (null === $this->entries) {
         $this->__load___();
     }
     return $this->entries->getValues();
 }
开发者ID:luisbrito,项目名称:Phraseanet,代码行数:7,代码来源:AggregateEntryCollection.php

示例2: getAuthorizationsCodes

 /**
  * @return array
  */
 public function getAuthorizationsCodes()
 {
     $codes = $this->authorizations->getValues();
     array_walk($codes, function (&$item) {
         $item = Authorization::PREFIX . $item->getCode();
     });
     return $codes;
 }
开发者ID:nicolasdewez,项目名称:webhome-auth,代码行数:11,代码来源:Group.php

示例3: getHash

 /**
  * Generates a string of currently query to use for the cache second level cache.
  *
  * @return string
  */
 protected function getHash()
 {
     $query = $this->getSQL();
     $hints = $this->getHints();
     $params = array_map(function (Parameter $parameter) {
         // Small optimization
         // Does not invoke processParameterValue for scalar values
         if (is_scalar($value = $parameter->getValue())) {
             return $value;
         }
         return $this->processParameterValue($value);
     }, $this->parameters->getValues());
     ksort($hints);
     return sha1($query . '-' . serialize($params) . '-' . serialize($hints));
 }
开发者ID:AlexanderForks,项目名称:doctrine2,代码行数:20,代码来源:AbstractQuery.php

示例4: setParameters

 /**
  * @param ArrayCollection|array $parameters
  * @throws \InvalidArgumentException
  * @return BufferedQueryResultIterator
  */
 public function setParameters($parameters)
 {
     $this->assertQueryWasNotExecuted('parameters');
     if ($parameters instanceof ArrayCollection) {
         $this->parameters = $parameters->getValues();
     } elseif (is_array($parameters)) {
         $this->parameters = $parameters;
     } else {
         throw new \InvalidArgumentException(sprintf('$parameters is expect to be an array or instance of "%s", "%s" is given', 'Doctrine\\Common\\Collections\\ArrayCollection', is_object($parameters) ? get_class($parameters) : gettype($parameters)));
     }
     return $this;
 }
开发者ID:alexisfroger,项目名称:pim-community-dev,代码行数:17,代码来源:BufferedQueryResultIterator.php

示例5: getValues

 /** {@inheritDoc} */
 public function getValues()
 {
     $this->initialize();
     return $this->collection->getValues();
 }
开发者ID:nikophil,项目名称:cmf-tests,代码行数:6,代码来源:PersistentCollection.php

示例6: getValues

 /**
  * Gets all values of the collection.
  *
  * @return array The values of all elements in the collection, in the order they
  *               appear in the collection.
  */
 public function getValues()
 {
     return $this->collection->getValues();
 }
开发者ID:Rybbow,项目名称:x-blog,代码行数:10,代码来源:ImmutableCollection.php

示例7: getAttachments

 /**
  * Returns the attachments for this project.
  *
  * @return ProjectAttachment[] The attachments
  */
 public function getAttachments()
 {
     return $this->attachments->getValues();
 }
开发者ID:partkeepr,项目名称:PartKeepr,代码行数:9,代码来源:Project.php

示例8: getRecipients

 /**
  * @return ArrayCollection
  */
 public function getRecipients()
 {
     return $this->recipients->getValues();
 }
开发者ID:opsway,项目名称:tocat-opsdesk-platform,代码行数:7,代码来源:Issue.php

示例9: addOrReplaceParameter

 /**
  * Adds parameter to collection and removes all other parameters with same name.
  *
  * @param ArrayCollection $parameters
  * @param Parameter $newParameter
  */
 protected function addOrReplaceParameter(ArrayCollection $parameters, Parameter $newParameter)
 {
     $removeParameters = [];
     /** @var Parameter $parameter */
     foreach ($parameters->getValues() as $parameter) {
         if ($parameter->getName() === $newParameter->getName()) {
             $removeParameters[] = $parameter;
         }
     }
     foreach ($removeParameters as $removeParameter) {
         $parameters->removeElement($removeParameter);
     }
     $parameters->add($newParameter);
 }
开发者ID:xamin123,项目名称:platform,代码行数:20,代码来源:ParameterBinder.php

示例10: getValues

 function getValues()
 {
     return $this->fields->getValues();
 }
开发者ID:tomaszhanc,项目名称:form-field-bundle,代码行数:4,代码来源:FieldCollection.php

示例11: testGetValues

 /**
  * Tests IdentityWrapper->getValues()
  */
 public function testGetValues()
 {
     $expected = array_values($this->entries);
     $this->assertSame($expected, $this->identityWrapper->getValues());
     $this->assertSame($expected, $this->wrappedCollection->getValues());
 }
开发者ID:cross-solution,项目名称:yawik,代码行数:9,代码来源:IdentityWrapperTest.php

示例12: checkForMandatoryFields

 /**
  * @param array $fields
  * @param array $data
  * @throws \HttpException
  */
 public function checkForMandatoryFields($fields, array $data)
 {
     $errors = new ArrayCollection();
     foreach ($fields as $field) {
         if (!array_key_exists($field, $data) || empty($data[$field])) {
             $errors->add($field . " is Mandatory");
         }
     }
     if ($errors->count() > 0) {
         throw new HttpException(Codes::HTTP_BAD_REQUEST, json_encode($errors->getValues()));
     }
 }
开发者ID:nandanprac,项目名称:capi,代码行数:17,代码来源:Helper.php

示例13: getAllVentas

 public static function getAllVentas($ventas)
 {
     $ventasTO = new ArrayCollection();
     if (count($ventas) > Generalkeys::NUMBER_ZERO) {
         foreach ($ventas as $venta) {
             $ventaTO = new VentaCompletaTO();
             $ventaDetalle = $venta->getVentaDetalle()->get(0);
             $ventaTO->setIdVenta($venta->getId());
             $ventaTO->setTipoReserva($ventaDetalle->getTipoProducto());
             $ventaTO->setNombres($venta->getDatosPersonales()->getNombres());
             $ventaTO->setApellidos($venta->getDatosPersonales()->getApellidos());
             $ventaTO->setTelefono($venta->getDatosUbicacion()->getTelefono());
             $ventaTO->setEmail($venta->getDatosUbicacion()->getEmail());
             $ventaTO->setNumeroAdultos($ventaDetalle->getNumeroAdultos());
             $ventaTO->setNumeroMenores($ventaDetalle->getNumeroMenores());
             $ventaTO->setCostoTotal($venta->getTotal());
             $ventaTO->setPagado($venta->getDatosPago()->getPagado());
             $ventaTO->setNombreProducto(self::getDescripcionProducto($ventaDetalle));
             $ventaTO->setFechaReserva(get_object_vars($venta->getDatosReserva()->getCheckIn())['date']);
             $ventaTO->setHotelPickup($venta->getDatosReserva()->getHotelPickup());
             if (is_null($venta->getDatosVuelo())) {
                 $ventaTO->setFechaLlegada(0);
                 $ventaTO->setFechaLlegada(0);
                 $ventaTO->setHoraLlegada(0);
                 $ventaTO->setNumeroVuelo(0);
                 $ventaTO->setAerolinea(0);
             } else {
                 $ventaTO->setFechaLlegada($venta->getDatosVuelo()->getFechaLlegada());
                 $ventaTO->setHoraLlegada($venta->getDatosVuelo()->getHoraLlegada());
                 $ventaTO->setNumeroVuelo($venta->getDatosVuelo()->getNumeroVuelo());
                 $ventaTO->setAerolinea($venta->getDatosVuelo()->getAerolinea());
                 $ventaTO->setHotelPickup($ventaDetalle->getHotel()->getDescripcion());
             }
             $ventaTO->setNumeroVoucher($venta->getDatosPago()->getNumeroVoucher());
             $ventasTO->add($ventaTO);
         }
     }
     return $ventasTO->getValues();
 }
开发者ID:neartux,项目名称:visitayucatan2.0,代码行数:39,代码来源:VentaUtils.php

示例14: getLettersFromContainer

 public function getLettersFromContainer()
 {
     return json_encode($this->lettersContainer->getValues());
 }
开发者ID:lenmen,项目名称:hangman_leon,代码行数:4,代码来源:LetterSaver.php

示例15: get_all

 /**
  * @return array
  */
 public function get_all()
 {
     $result = new ArrayCollection();
     foreach ($this->processingFunction->findAll() as $item) {
         $args = $this->processingArgs->findBy(['itemId' => $item->getId()]);
         foreach ($args as $arg) {
             $result->add(['itemId' => $item->getId(), 'id' => $arg->getId(), 'function' => $item->getFunction(), 'argsKey' => $arg->getKeyName(), 'argsValue' => $arg->getValue()]);
         }
     }
     return $result->getValues();
 }
开发者ID:siller444,项目名称:tsym,代码行数:14,代码来源:Processing.php


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