@param Configuration $configuration
@param Parameter     $parameter
@param bool          $reverse

@return $this
960813
protected function prepareCollection(Configuration $configuration, Parameter $parameter, $reverse = false)
  {
    if ($reverse === false)
    {
      $this->dispatcher->dispatch(
        TransformerEvents::PREPARE_COLLECTION,
        new TransformerEvent($configuration, $parameter)
      );
    }
    else
    {
      $this->dispatcher->dispatch(
        TransformerEvents::REVERSE_COLLECTION,
        new TransformerEvent($configuration, $parameter)
      );
    }

    $child_array = $parameter->getValue();

    $object_configuration = clone $configuration;
    $object_configuration->setType(TypeEnum::OBJECT_TYPE);
    $object_configuration->getOptions()->setReturnClass(
      $configuration->getOptions()->getReturnClass()
    );
    $object_configuration->getOptions()->setDefaultValue(
      $configuration->getOptions()->getDefaultValue()
    );
    $object_configuration->setParent($configuration);

    $result_array = array();
    $childs       = count($child_array);
    for ($i = 0; $i < $childs; ++$i)
    {
      $param = new Parameter($i, $child_array[$i]);
      if ($reverse === false)
      {
        $this->prepareObject($object_configuration, $param);
      }
      else
      {
        $this->reverseObject($object_configuration, $param);
      }

      array_push($result_array, $param->getValue());
    }

    $parameter->setValue($result_array);

    return $this;
  }
145992
public function withParameter(string $key, $parameter): self
    {
        if (Str::of($key)->empty()) {
            throw new DomainException;
        }

        $query = new self($this->cypher);
        $query->parameters = $this->parameters->put(
            $key,
            new Parameter($key, $parameter)
        );

        return $query;
    }
718328
public function configParam($parameter)
    {
        $value = $this->container->getParameter($parameter);

        return is_array($value) ? json_encode($value) : $value;
    }
1117665
public function configure(Configuration $configuration)
    {
        foreach ($this->nsMap as $type => $map) {
            if (!count($map)) {
                continue;
            }
            $method = 'get' . ucfirst($type) . 'NamespacesMap';
            if (!method_exists($configuration, $method)) {
                throw new InvalidArgumentException('Invalid type of structure namespaces map: ' . $type);
            }
            /** @var $nsMap Configuration\NamespacesMap */
            $nsMap = $configuration->$method();
            $nsMap->add($map);
        }
    }
114279
protected function normalizeDate(Parameter $parameter, Configuration $configuration)
  {
    if (is_array($parameter->getValue()))
    {
      try
      {
        // 'date' ist der Standard-Key, wenn ein DateTime-Objekt in Array umgewandelt wird
        $date   = new \DateTime($parameter->getValue()['date']);
        $format = $configuration->getOptions()->getExpectedFormat()[0];
        $parameter->setValue($date->format($format));
      }
      catch (\Exception $e)
      {
        throw new TransformerException('"' . $configuration->getKey() . '" is not a date string.');
      }
    }
  }
1047370
public function queryset($modelInstance, $reverse = true)
    {
        if ($reverse) {
            $model = $this->field->getRelatedModel();
        } else {
            $model = $this->field->scopeModel;
        }

        // define BaseM2MQueryset
        if (!class_exists('\Eddmash\PowerOrm\Model\Manager\BaseM2OManager', false)) {
            $baseClass = $model::getManagerClass();
            $class = sprintf('namespace Eddmash\PowerOrm\Model\Manager;class BaseM2OManager extends \%s{}', $baseClass);
            eval($class);
        }

        $manager = M2OManager::createObject(
            [
                'model' => $model,
                'rel' => $this->field->relation,
                'instance' => $modelInstance,
                'reverse' => $reverse,
            ]
        );

        return $manager;
    }
1098345
public OvhReverseIp ip_reverse_POST(String ip, String ipReverse, String reverse) throws IOException {
		String qPath = "/ip/{ip}/reverse";
		StringBuilder sb = path(qPath, ip);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "ipReverse", ipReverse);
		addBody(o, "reverse", reverse);
		String resp = exec(qPath, "POST", sb.toString(), o);
		return convertTo(resp, OvhReverseIp.class);
	}
410664
public function & InitAll () {
		/** @var $this \MvcCore\Route */
		if ($this->match === NULL && $this->reverse === NULL) {
			$this->initMatchAndReverse();
		} else if ($this->match !== NULL && ($this->reverseParams === NULL || $this->lastPatternParam === NULL)) {
			$this->initReverse();
		}
		return $this;
	}
648127
public function apply(Request $request, ParamConverter $configuration)
    {
        $name = $configuration->getName();
        $repo = null;

        if (null != $request->attributes->get('id')) {
            $repo = $this->findById($request);
        } else {
            if (null != $request->attributes->get('slug')) {
                $repo = $this->findBySlug($request);
            }
        }

        if ($repo) {
            $request->attributes->set($name, $repo);

            return true;
        }

        return false;
    }
1154279
public function apply(Request $request, ParamConverter $configuration)
    {
        if (null === $parameter = $configuration->getName()) {
            throw new InvalidConfigurationException(InvalidConfigurationException::MISSING_NAME);
        }

        // Check whether we need to let pass anonymous
        $allowAnonymous = false;
        $options = $configuration->getOptions();
        if ($options && isset($options['allowAnonymous']) && true === $options['allowAnonymous']) {
            $allowAnonymous = true;
        }

        $token = $this->tokenStorage->getToken();
        if ($token) {
            $user = $token->getUser();
            if ($user instanceof User) {
                $request->attributes->set($parameter, $user);

                return true;
            } elseif ($allowAnonymous) {
                $request->attributes->set($parameter, null);

                return true;
            }
        }

        throw new AccessDeniedException();
    }
509335
public function having($condition, $parameter = [])
	{
		$this->emptyResult();
		$this->queryBuilder->addHaving($condition, $parameter);
		return $this;
	}
689995
public function apply(Request $request, ParamConverter $configuration)
    {
        if (null === $parameter = $configuration->getName()) {
            throw new InvalidConfigurationException(InvalidConfigurationException::MISSING_NAME);
        }

        if (null === $entityClass = $configuration->getClass()) {
            throw new InvalidConfigurationException(InvalidConfigurationException::MISSING_CLASS);
        }

        $options = $configuration->getOptions();

        if (!isset($options['id'])) {
            throw new InvalidConfigurationException(InvalidConfigurationException::MISSING_ID);
        }

        if ($request->attributes->has($options['id'])) {
            if (null !== $id = $request->attributes->get($options['id'])) {
                if (null !== $entity = $this->em->getRepository($entityClass)->find($id)) {
                    $request->attributes->set($parameter, $entity);

                    return true;
                }
            }

            if (!$configuration->isOptional()) {
                throw new NotFoundHttpException();
            }
        }

        return false;
    }
252455
public static Comparator comparator(final Mapper mapper, final boolean reverse){
        return new Comparator(){
            public int compare(Object o, Object o1) {
                return ((Comparable) mapper.map(reverse?o1:o)).compareTo(mapper.map(reverse?o:o1));
            }
        };
    }
753721
def to_h
      configs = configurations.reverse.inject({}) do |memo, db_config|
        memo.merge(db_config.to_legacy_hash)
      end

      Hash[configs.to_a.reverse]
    end
992820
protected function sortItemsBy(string $key, bool $reverse = false)
    {
        if (is_array($this->content) && !array_key_exists('items', $this->content)) {
            return $this;
        }

        if (!$this->content->has('items')) {
            return $this;
        }

        $sortDirection = $reverse ? 'sortByDesc' : 'sortBy';

        $this->content['items'] = collect($this->content['items'])->$sortDirection($key);

        return $this;
    }
109940
public function reverse(Model\InStore\Reversal $orderReversal, HandlerStack $stack = null)
    {
        try {
            $params = $this->generateParams($orderReversal, $stack);

            $result = $this->getClient()->post('orders/reverse', $params);

            /** @var Model\InStore\Reversal $reversal */
            $reversal = $this->getSerializer()->deserialize(
                (string) $result->getBody(),
                Model\InStore\Reversal::class,
                'json'
            );

            return $reversal;
        } catch (BadResponseException $e) {
            throw new ApiException(
                $this->getSerializer()->deserialize(
                    (string) $e->getResponse()->getBody(),
                    Model\ErrorResponse::class,
                    'json'
                ),
                $e
            );
        }
    }
309317
public ActionDeclaration withConfiguration(java.util.Map<String, String> configuration) {
        setConfiguration(configuration);
        return this;
    }