src/Phossa/Cache/CachePool.php
protected function createItem(/*# string */ $key)/*# : CacheItemInterface */
    {
        // validate key first
        $this->validateKey($key);

        // use item factory
        if (is_callable($this->item_factory)) {
            $func = $this->item_factory;
            $item = $func($key, $this, $this->item_config);

        // default CacheItem class
        } else {
            $item = new CacheItem($key, $this, $this->item_config);
        }

        return $item;
    }
protected function createItem(/*# string */ $key)/*# : CacheItemInterface */
    {
        // validate key first
        $this->validateKey($key);

        // use item factory
        if (is_callable($this->item_factory)) {
            $func = $this->item_factory;
            $item = $func($key, $this, $this->item_config);

        // default CacheItem class
        } else {
            $item = new CacheItem($key, $this, $this->item_config);
        }

        return $item;
    }
protected function createItem ( /*# string */ $ key ) /*# : CacheItemInterface */ { // validate key first $ this -> validateKey ( $ key ) ; // use item factory if ( is_callable ( $ this -> item_factory ) ) { $ func = $ this -> item_factory ; $ item = $ func ( $ key , $ this , $ this -> item_config ) ; // default CacheItem class } else { $ item = new CacheItem ( $ key , $ this , $ this -> item_config ) ; } return $ item ; }
Create item object

@param  string $key item key
@return CacheItemInterface
@throws Exception\InvalidArgumentException
@access protected
Create item object