當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。