Log cache miss if no_cache is true.

@param array  $parameters
@param object $parentObject
507882
public function log(&$parameters, $parentObject)
    {
        if ($parameters['pObj']) {
            if ($parameters['pObj']->no_cache) {
                $timeOutTime = 0;
                StaticFileCache::getInstance()
                    ->insertPageInCache($parameters['pObj'], $timeOutTime);
            }
        }
    }
170078
private function matchHidden(ParentNode $parent) {
    $parent->addChildren($this->getSkipNodes($this->skipped));
    $this->skipped = [];
    $this->skipParent = $parent;
  }
740259
protected function getObjectsRawData(array $parameters = array())
    {
        $cacheKey = md5(json_encode(array($this->getName(), $parameters)));

        if (!array_key_exists($cacheKey, self::$listObjectsCache)) {
            $tmp = array();

            foreach ($parameters as $k => $v) {
                if (in_array($k, self::$allowedParameters)) {
                    $tmp[$k] = $v;
                }
            }

            $response = $this->connection->makeRequest(Client::GET, array($this->name), array(), $tmp);
            self::$listObjectsCache[$cacheKey] = $response['body'];
        }

        return self::$listObjectsCache[$cacheKey];
    }
1084720
protected function useParentMethodAndExternals($method, $parameters, $includeExternals = false, $returnOne = false)
    {
        $result = call_user_func_array([
            $this,
            sprintf('parent::%s', $method),
        ], $parameters);
        if ($includeExternals === true && (($returnOne === true && $result === null) || $returnOne === false)) {
            $result = $this->useExternalSchemas($method, $parameters, $result, $returnOne);
        }
        return $result;
    }
1243170
public function handleChildren($parent, $parentWrapper)
    {
        if ($parent instanceof TaskAdapter) {
            $parent = $parent->getProxy();
        }

        $parentClass = $parent === null ? get_class() : get_class($parent);
        $ih = IntrospectionHelper::getHelper($parentClass);

        for ($i = 0, $childrenCount = count($this->children); $i < $childrenCount; $i++) {
            $childWrapper = $parentWrapper->getChild($i);
            $child = $this->children[$i];

            $realChild = null;
            if ($parent instanceof TaskContainer) {
                $parent->addTask($child);
                continue;
            }

            $project = $this->project === null ? $parent->project : $this->project;
            $realChild = $ih->createElement($project, $parent, $child->getTag());

            $childWrapper->setProxy($realChild);
            if ($realChild instanceof Task) {
                $realChild->setRuntimeConfigurableWrapper($childWrapper);
            }

            $childWrapper->maybeConfigure($this->project);
            $child->handleChildren($realChild, $childWrapper);
        }
    }
448996
protected static function isDeleteableIncludedResource(array &$mappings, $parentType, $includeValue)
    {
        if (!isset($includeValue[Serializer::CLASS_IDENTIFIER_KEY])) {
            return true;
        }

        return !empty($mappings[$parentType])
        && count($mappings[$parentType]->getIncludedResources()) > 0
        && false === in_array($includeValue[Serializer::CLASS_IDENTIFIER_KEY], $mappings[$parentType]->getIncludedResources(), true);
    }
355871
public static function setResponseDataRelationship(array &$mappings, array &$array, array $parent)
    {
        $data = [JsonApiTransformer::RELATIONSHIPS_KEY => []];

        foreach ($array as $propertyName => $value) {
            if (\is_array($value)) {
                self::addRelationshipData($mappings, $parent, $value, $propertyName, $data);
                if (\array_key_exists(Serializer::MAP_TYPE, $value)) {
                    $newData = [];

                    foreach ($value[Serializer::SCALAR_VALUE] as $d) {
                        self::addRelationshipData($mappings, $parent, $d, $propertyName, $newData);

                        if (!empty($d[Serializer::CLASS_IDENTIFIER_KEY])) {
                            $type = $d[Serializer::CLASS_IDENTIFIER_KEY];

                            if (!in_array($propertyName, RecursiveFormatterHelper::getIdProperties($mappings, $type), true)) {
                                $parentType = $d[Serializer::CLASS_IDENTIFIER_KEY];

                                list($idValues, $idProperties) = RecursiveFormatterHelper::getIdPropertyAndValues(
                                    $mappings,
                                    $d,
                                    $parentType
                                );

                                if (!empty($mappings[$parentType]) && !empty($selfLink = $mappings[$parentType]->getRelationshipSelfUrl($propertyName))) {
                                    $href = \str_replace($idProperties, $idValues, $selfLink);
                                    if ($selfLink != $href) {
                                        $propertyNameKey = DataAttributesHelper::transformToValidMemberName($propertyName);
                                        $propertyNameKey = self::camelCaseToUnderscore($propertyNameKey);

                                        $newData[JsonApiTransformer::RELATIONSHIPS_KEY][$propertyNameKey][JsonApiTransformer::LINKS_KEY][JsonApiTransformer::SELF_LINK][JsonApiTransformer::LINKS_HREF] = $href;
                                    }
                                }
                            }
                        }

                        if (!empty($newData[JsonApiTransformer::RELATIONSHIPS_KEY][$propertyName])) {
                            $propertyNameKey = DataAttributesHelper::transformToValidMemberName($propertyName);
                            $propertyNameKey = self::camelCaseToUnderscore($propertyNameKey);

                            if (!empty($d[Serializer::CLASS_IDENTIFIER_KEY])) {
                                $type = $d[Serializer::CLASS_IDENTIFIER_KEY];
                                $parentType = $parent[Serializer::CLASS_IDENTIFIER_KEY];

                                //Removes relationships related to the current resource if filtering include resources has been set.
                                if (!empty($mappings[$parentType]) && !empty($mappings[$parentType]->isFilteringIncludedResources())) {
                                    foreach ($newData[JsonApiTransformer::RELATIONSHIPS_KEY][$propertyName] as $position => $includedResource) {
                                        if (count($mappings[$parentType]->getIncludedResources()) > 0 &&
                                            false === in_array($type, $mappings[$parentType]->getIncludedResources(), true)
                                        ) {
                                            unset($newData[JsonApiTransformer::RELATIONSHIPS_KEY][$propertyName][$position]);
                                        }
                                    }
                                }

                                $newData[JsonApiTransformer::RELATIONSHIPS_KEY][$propertyName] = array_filter($newData[JsonApiTransformer::RELATIONSHIPS_KEY][$propertyName]);
                                if (!empty($newData[JsonApiTransformer::RELATIONSHIPS_KEY][$propertyName][JsonApiTransformer::DATA_KEY])) {
                                    $data[JsonApiTransformer::RELATIONSHIPS_KEY][$propertyNameKey][JsonApiTransformer::DATA_KEY][] = $newData[JsonApiTransformer::RELATIONSHIPS_KEY][$propertyName][JsonApiTransformer::DATA_KEY];
                                }
                            }
                        }
                    }
                }
            }
        }

        return (array) \array_filter($data);
    }
185436
public function checkModifierFunctions(array $array, $parent, $parentKey = null)
    {
        foreach($array as $k => $v)
        {
            // You can have recursive modifiers so we check if the value is an array.
            if(is_array($v))
            {
                // Check config
                // Valid configs can be top level modifiers and their attributes inside - you can have a top level modifier
                // inside a top level modifier - that's why we also check \Tripod\Mongo\Composites\Tables::$predicatesModifiers direct
                if(!array_key_exists($k, $parent) && !array_key_exists($k, \Tripod\Mongo\Composites\Tables::$predicateModifiers))
                {
                    throw new \Tripod\Exceptions\ConfigException("Invalid modifier: '".$k."' in key '".$parentKey."'");
                }

                // If this config value is a top level modifier, use that as the parent so that we can check the attributes
                if(array_key_exists($k, \Tripod\Mongo\Composites\Tables::$predicateModifiers))
                {
                    $this->checkModifierFunctions($v, \Tripod\Mongo\Composites\Tables::$predicateModifiers[$k], $k);
                } else
                {
                    $this->checkModifierFunctions($v, $parent[$k], $k);
                }

            } else if(is_string($k))
            {
                // Check key
                if(!array_key_exists($k, $parent))
                {
                    throw new \Tripod\Exceptions\ConfigException("Invalid modifier: '".$k."' in key '".$parentKey."'");
                }
            }
        }
    }
1174681
public function setParent($parent)
    {
        if ($parent !== null &&  !$parent instanceof BaseEntry) {
            throw new \InvalidArgumentException('An entry may only have another entry as parent');
        }

        $this->parent = $parent;
    }
728781
public function setParent (Logger $parent) {
    $this->handlers = $parent->handlers;
    $this->processors = $parent->processors;
    $this->level = $parent->level;
  }
752120
private function checkQueryResourceId(array $parameters, string $type): void
    {
        if (!$this->resourceId && $parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query with a resource ID, but the repository %s does not provide support for them',
                $this->name
            ));
        }
        if (self::ENDPOINT_SINGLE === $type && !$parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query a single element without providing a resource ID for repository %s',
                $this->name
            ));
        }
        if (self::ENPOINT_COLLECTION === $type && $parameters['resource_id']) {
            throw new \InvalidArgumentException(\sprintf(
                'Trying to query a collection element by providing a resource ID for repository %s',
                $this->name
            ));
        }
    }
94876
public ResponseBuilder initialize(final Resource parent, final Resource resource) {

        if (MISSING_RESOURCE.equals(resource)) {
            // Can't patch non-existent resources
            throw new NotFoundException();
        } else if (DELETED_RESOURCE.equals(resource)) {
            // Can't patch non-existent resources
            throw new ClientErrorException(GONE);
        } else if (updateBody == null) {
            LOGGER.error("Missing body for update: {}", resource.getIdentifier());
            throw new BadRequestException("Missing body for update");
        } else if (!supportsInteractionModel(LDP.RDFSource)) {
            throw new BadRequestException(status(BAD_REQUEST)
                .link(UnsupportedInteractionModel.getIRIString(), LDP.constrainedBy.getIRIString())
                .entity("Unsupported interaction model provided").type(TEXT_PLAIN_TYPE).build());
        } else if (syntax == null) {
            // Get the incoming syntax and check that the underlying I/O service supports it
            LOGGER.warn("Content-Type: {} not supported", getRequest().getContentType());
            throw new NotSupportedException();
        }
        // Check the cache headers
        final EntityTag etag = new EntityTag(buildEtagHash(getIdentifier(), resource.getModified(),
                    getRequest().getPrefer()));
        checkCache(resource.getModified(), etag);

        setResource(resource);
        resource.getContainer().ifPresent(p -> setParent(parent));
        return ok();
    }
582244
public function bindParent($parent, $parentPropertyName=NULL)
	{
		$this->_parent = $parent;
		$this->_parentPropertyName = $parentPropertyName;
		return $this;
	}
62320
protected function copyVatInfoToParent(array $parent, array $children)
    {
        $parent[Meta::VatAmount] = 0;
        // Copy vat rate info from a child when the parent has no vat rate info.
        if (empty($parent[Tag::VatRate]) || Number::isZero($parent[Tag::VatRate])) {
            $parent[Tag::VatRate] = CompletorInvoiceLines::getMaxAppearingVatRate($children, $index);
            $parent[Meta::VatRateSource] = Completor::VatRateSource_Copied_From_Children;
            if (isset($children[$index][Meta::VatRateMin])) {
                $parent[Meta::VatRateMin] = $children[$index][Meta::VatRateMin];
            } else {
                unset($parent[Meta::VatRateMin]);
            }
            if (isset($children[$index][Meta::VatRateMax])) {
                $parent[Meta::VatRateMax] = $children[$index][Meta::VatRateMax];
            } else {
                unset($parent[Meta::VatRateMax]);
            }
        }
        $parent[Meta::LineVatAmount] = 0;
        unset($parent[Meta::LineDiscountVatAmount]);

        return $parent;
    }
1096075
private function ensureParentAndKey($parent, $key)
    {
        if (!$this->parent)
        {
            $this->parent = $parent;
        }
        if (!$this->key)
        {
            $this->key = $key;
        }
        if ($this->parent != $parent)
        {
            throw new \Exception('Internal Error. Relation retrieved from two different Objects.');
        }
        if ($this->key != $key)
        {
            throw new \Exception('Internal Error. Relation retrieved from two different keys.');
        }
    }
1334970
private function executeUsingQueryCache($parameters = null, $hydrationMode = null)
    {
        $rsm        = $this->getResultSetMapping();
        $querykey   = new QueryCacheKey($this->getHash(), $this->lifetime, $this->cacheMode ?: Cache::MODE_NORMAL);
        $queryCache = $this->_em->getCache()->getQueryCache($this->cacheRegion);
        $result     = $queryCache->get($querykey, $rsm, $this->_hints);

        if ($result !== null) {
            if ($this->cacheLogger) {
                $this->cacheLogger->queryCacheHit($queryCache->getRegion()->getName(), $querykey);
            }

            return $result;
        }

        $result = $this->executeIgnoreQueryCache($parameters, $hydrationMode);
        $cached = $queryCache->put($querykey, $rsm, $result, $this->_hints);

        if ($this->cacheLogger) {
            $this->cacheLogger->queryCacheMiss($queryCache->getRegion()->getName(), $querykey);

            if ($cached) {
                $this->cacheLogger->queryCachePut($queryCache->getRegion()->getName(), $querykey);
            }
        }

        return $result;
    }
1149826
public function setDefaultCaching(array $parameters)
    {
        if (! class_exists('Doctrine\Common\Cache\CacheProvider')) {
            //@codeCoverageIgnoreStart
            throw new \RuntimeException(
                'Could not find the doctrine cache library,
                have you added doctrine-cache to your composer.json?'
            );
            //@codeCoverageIgnoreEnd
        }

        CacheSubscriber::attach(
            $this->getAdapter()->getClient(),
            ['storage' => new CacheStorage($parameters['handler'])]
        );

        return $this;
    }