Version: current

# Class phpMorphy_GramInfo

This file is part of phpMorphy library

Copyright c 2007-2008 Kamaev Vladimir <heromantor@users.sourceforge.net>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

  phpMorphy_GramInfo implements phpMorphy_GramInfo_Interace

Abstract
Located at search/code/phpmorphy/graminfo/graminfo.php

## Methods summary

`protected` | # `phpMorphy_GramInfo( mixed $resource, mixed $header )`
`public static` | # `create( `phpMorphy_Storage` $storage, mixed $lazy )`
`public string` | # `getLocale( )` Returns langugage for graminfo file Returns langugage for graminfo file #### Returns `string` string #### Implementation of `phpMorphy_GramInfo_Interace::getLocale()`
`public string` | # `getEncoding( )` Return encoding for graminfo file Return encoding for graminfo file #### Returns `string` string #### Implementation of `phpMorphy_GramInfo_Interace::getEncoding()`
`public integer` | # `getCharSize( )` Return size of character (cp1251 - 1, utf8 - 1, utf16 - 2, utf32 - 4 etc) Return size of character (cp1251 - 1, utf8 - 1, utf16 - 2, utf32 - 4 etc) #### Returns `integer` int #### Implementation of `phpMorphy_GramInfo_Interace::getCharSize()`
`public string` | # `getEnds( )` Return end of string value (usually string with \0 value of char_size + 1 length) Return end of string value (usually string with \0 value of char_size + 1 length) #### Returns `string` string #### Implementation of `phpMorphy_GramInfo_Interace::getEnds()`
`public` | # `getHeader( )` #### Implementation of `phpMorphy_GramInfo_Interace::getHeader()`
`protected static` | # `readHeader( mixed $headerRaw )`
`protected static` | # `validateHeader( mixed $header )`
`protected` | # `cleanupCString( mixed $string )`
`abstract protected` | # `readSectionIndex( mixed $offset, mixed $count )`
`protected` | # `readSectionIndexAsSize( mixed $offset, mixed $count, mixed $total_size )`

### Methods inherited from phpMorphy_GramInfo_Interace

`getGramInfoHeaderSize()`, `readAllAncodes()`, `readAllGramInfoOffsets()`, `readAllGrammems()`, `readAllPartOfSpeech()`, `readAncodes()`, `readFlexiaData()`, `readGramInfoHeader()`

### Magic methods summary

## Constants summary

`integer` | `HEADER_SIZE` | `128` | #

## Properties summary

`protected mixed` | $resource | #
`protected mixed` | $header | #
`protected mixed` | $ends | #
`protected mixed` | $ends_size | #

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -