本文整理汇总了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();
}
示例2: getAuthorizationsCodes
/**
* @return array
*/
public function getAuthorizationsCodes()
{
$codes = $this->authorizations->getValues();
array_walk($codes, function (&$item) {
$item = Authorization::PREFIX . $item->getCode();
});
return $codes;
}
示例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));
}
示例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;
}
示例5: getValues
/** {@inheritDoc} */
public function getValues()
{
$this->initialize();
return $this->collection->getValues();
}
示例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();
}
示例7: getAttachments
/**
* Returns the attachments for this project.
*
* @return ProjectAttachment[] The attachments
*/
public function getAttachments()
{
return $this->attachments->getValues();
}
示例8: getRecipients
/**
* @return ArrayCollection
*/
public function getRecipients()
{
return $this->recipients->getValues();
}
示例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);
}
示例10: getValues
function getValues()
{
return $this->fields->getValues();
}
示例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());
}
示例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()));
}
}
示例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();
}
示例14: getLettersFromContainer
public function getLettersFromContainer()
{
return json_encode($this->lettersContainer->getValues());
}
示例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();
}