_get example

        clearstatcache();
        return $this->_clean($this->_options['cache_dir']$mode$tags);
    }

    /** * Return an array of stored cache ids * * @return array array of stored cache ids (string) */
    public function getIds()
    {
        return $this->_get($this->_options['cache_dir'], 'ids', array());
    }

    /** * Return an array of stored tags * * @return array array of stored tags (string) */
    public function getTags()
    {
        return $this->_get($this->_options['cache_dir'], 'tags', array());
    }

    
/** * `get()` returns the product line-item with the given product id. * * @param string $productId The id of the product, of which the line-item should be returned. * * @return ItemFacade|null The line-item associated with the given product id, or null if it does not exist. * * @example payload-cases/payload-cases.twig 5 1 Get a product line-item by id. */
    public function get(string $productId): ?ItemFacade
    {
        $item = $this->_get($productId);

        if ($item === null) {
            return null;
        }

        if ($item->getType() !== LineItem::PRODUCT_LINE_ITEM_TYPE) {
            return null;
        }

        return $item;
    }

    
Home | Imprint | This part of the site doesn't use cookies.