API Documentation

Zend/Search/Lucene/Storage/File.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Search_Lucene  
Subpackage
Storage  
Version
$Id: File.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Search_Lucene_Storage_File

Package: Zend\Search\Lucene\Storage

Children
\Zend_Search_Lucene_Storage_File_Filesystem
\Zend_Search_Lucene_Storage_File_Memory
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Methods

methodprotected_fread( integer $length = 1 ) : string
abstract

Reads $length number of bytes at the current position in the file and advances the file pointer.

Parameters
Name Type Description
$length integer
Returns
Type Description
string
methodprotected_fwrite( string $data, integer $length = null ) : void
abstract

Writes $length number of bytes (all, if $length===null) to the end of the file.

Parameters
Name Type Description
$data string
$length integer
methodpublicflush( ) : boolean
abstract

Flush output.

Returns true on success or false on failure.

Returns
Type Description
boolean
methodpubliclock( integer $lockType,  $nonBlockinLock = false ) : boolean
abstract

Lock file

Lock type may be a LOCK_SH (shared lock) or a LOCK_EX (exclusive lock)

Parameters
Name Type Description
$lockType integer
$nonBlockinLock
Returns
Type Description
boolean
methodpublicreadBinary( ) : string

Reads binary data from the current position in the file and advances the file pointer.

Returns
Type Description
string
methodpublicreadByte( ) : integer

Reads a byte from the current position in the file and advances the file pointer.

Returns
Type Description
integer
methodpublicreadBytes( integer $num ) : string

Read num bytes from the current position in the file and advances the file pointer.

Parameters
Name Type Description
$num integer
Returns
Type Description
string
methodpublicreadInt( ) : integer

Reads an integer from the current position in the file and advances the file pointer.

Returns
Type Description
integer
methodpublicreadLong( ) : integer|float

Returns a long integer from the current position in the file and advances the file pointer.

Returns
Type Description
integer|float
Throws
Exception Description
\Zend_Search_Lucene_Exception
methodpublicreadLong32Bit( ) : integer|float

Returns a long integer from the current position in the file, advances the file pointer and return it as float (for 32-bit platforms).

Returns
Type Description
integer|float
Throws
Exception Description
\Zend_Search_Lucene_Exception
methodpublicreadString( ) : string

Reads a string from the current position in the file and advances the file pointer.

Returns
Type Description
string
methodpublicreadVInt( ) : integer

Returns a variable-length integer from the current position in the file and advances the file pointer.

Returns
Type Description
integer
methodpublicseek( integer $offset, integer $whence = SEEK_SET ) : integer
abstract

Sets the file position indicator and advances the file pointer.

The new position, measured in bytes from the beginning of the file, is obtained by adding offset to the position specified by whence, whose values are defined as follows: SEEK_SET - Set position equal to offset bytes. SEEK_CUR - Set position to current location plus offset. SEEK_END - Set position to end-of-file plus offset. (To move to a position before the end-of-file, you need to pass a negative value in offset.) Upon success, returns 0; otherwise, returns -1

Parameters
Name Type Description
$offset integer
$whence integer
Returns
Type Description
integer
methodpublictell( ) : integer
abstract

Get file position.

Returns
Type Description
integer
methodpublicunlock( ) : void
abstract

Unlock file

methodpublicwriteByte( integer $byte ) : void

Writes a byte to the end of the file.

Parameters
Name Type Description
$byte integer
methodpublicwriteBytes( string $data, integer $num = null ) : void

Writes num bytes of data (all, if $num===null) to the end of the string.

Parameters
Name Type Description
$data string
$num integer
methodpublicwriteInt( integer $value ) : void

Writes an integer to the end of file.

Parameters
Name Type Description
$value integer
methodpublicwriteLong( integer $value ) : void

Writes long integer to the end of file

Parameters
Name Type Description
$value integer
Throws
Exception Description
\Zend_Search_Lucene_Exception
methodpublicwriteLong32Bit( integer|float $value ) : void

Writes long integer to the end of file (32-bit platforms implementation)

Parameters
Name Type Description
$value integer|float
Throws
Exception Description
\Zend_Search_Lucene_Exception
methodpublicwriteString( string $str ) : void

Writes a string to the end of file.

Parameters
Name Type Description
$str string
Throws
Exception Description
\Zend_Search_Lucene_Exception
methodpublicwriteVInt( integer $value ) : void

Writes a variable-length integer to the end of file.

Parameters
Name Type Description
$value integer
Documentation was generated by DocBlox 0.15.1.