lib/classes/Swift/KeyCache/DiskKeyCache.php
private function getHandle($nsKey, $itemKey, $position)
    {
        if (!isset($this->keys[$nsKey][$itemKey])) {
            $openMode = $this->hasKey($nsKey, $itemKey) ? 'r+b' : 'w+b';
            $fp = fopen($this->path.'/'.$nsKey.'/'.$itemKey, $openMode);
            $this->keys[$nsKey][$itemKey] = $fp;
        }
        if (self::POSITION_START == $position) {
            fseek($this->keys[$nsKey][$itemKey], 0, SEEK_SET);
        } elseif (self::POSITION_END == $position) {
            fseek($this->keys[$nsKey][$itemKey], 0, SEEK_END);
        }

        return $this->keys[$nsKey][$itemKey];
    }
private function getHandle($nsKey, $itemKey, $position)
    {
        if (!isset($this->keys[$nsKey][$itemKey])) {
            $openMode = $this->hasKey($nsKey, $itemKey) ? 'r+b' : 'w+b';
            $fp = fopen($this->path.'/'.$nsKey.'/'.$itemKey, $openMode);
            $this->keys[$nsKey][$itemKey] = $fp;
        }
        if (self::POSITION_START == $position) {
            fseek($this->keys[$nsKey][$itemKey], 0, SEEK_SET);
        } elseif (self::POSITION_END == $position) {
            fseek($this->keys[$nsKey][$itemKey], 0, SEEK_END);
        }

        return $this->keys[$nsKey][$itemKey];
    }
private function getHandle ( $ nsKey , $ itemKey , $ position ) { if ( ! isset ( $ this -> keys [ $ nsKey ] [ $ itemKey ] ) ) { $ openMode = $ this -> hasKey ( $ nsKey , $ itemKey ) ? 'r+b' : 'w+b' ; $ fp = fopen ( $ this -> path . '/' . $ nsKey . '/' . $ itemKey , $ openMode ) ; $ this -> keys [ $ nsKey ] [ $ itemKey ] = $ fp ; } if ( self :: POSITION_START == $ position ) { fseek ( $ this -> keys [ $ nsKey ] [ $ itemKey ] , 0 , SEEK_SET ) ; } elseif ( self :: POSITION_END == $ position ) { fseek ( $ this -> keys [ $ nsKey ] [ $ itemKey ] , 0 , SEEK_END ) ; } return $ this -> keys [ $ nsKey ] [ $ itemKey ] ; }
Get a file handle on the cache item.

@param string $nsKey
@param string $itemKey
@param int    $position

@return resource
Get a file handle on the cache item .