src/Phossa2/Cache/Traits/CacheItemAwareTrait.php
protected function createCacheItem(/*# string */ $key)/*# : CacheItemExtendedInterface */
    {
        if (is_callable($this->item_factory)) {
            $func = $this->item_factory;
            $item = $func($key, $this);
        } else {
            $item = new CacheItem($key, $this);
        }

        return $item;
    }
protected function createCacheItem(/*# string */ $key)/*# : CacheItemExtendedInterface */
    {
        if (is_callable($this->item_factory)) {
            $func = $this->item_factory;
            $item = $func($key, $this);
        } else {
            $item = new CacheItem($key, $this);
        }

        return $item;
    }
protected function createCacheItem ( /*# string */ $ key ) /*# : CacheItemExtendedInterface */ { if ( is_callable ( $ this -> item_factory ) ) { $ func = $ this -> item_factory ; $ item = $ func ( $ key , $ this ) ; } else { $ item = new CacheItem ( $ key , $ this ) ; } return $ item ; }
Create a cache item on the fly

@param  string $key
@return CacheItemExtendedInterface
@access protected
Create a cache item on the fly