Version: current

# Class phpMorphy_Fsa_Decorator

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_Fsa_Decorator implements phpMorphy_Fsa_Interface

### Direct known subclasses

`phpMorphy_Fsa_Proxy`

Located at search/code/phpmorphy/fsa/fsa.php

## Methods summary

`public` | # `phpMorphy_Fsa_Decorator( `phpMorphy_Fsa_Interface` $fsa )`
`public array` | # `getRootTrans( )` Return root transition of fsa Return root transition of fsa #### Returns `array` array #### Implementation of `phpMorphy_Fsa_Interface::getRootTrans()`
`public mixed` | # `getRootState( )` Returns root state object Returns root state object #### Returns `mixed` #### Implementation of `phpMorphy_Fsa_Interface::getRootState()`
`public array` | # `getAlphabet( )` Returns alphabet i.e. all chars used in automat Returns alphabet i.e. all chars used in automat #### Returns `array` array #### Implementation of `phpMorphy_Fsa_Interface::getAlphabet()`
`public string` | # `getAnnot( array $trans )` Return annotation for given transition(if annotation flag is set for given trans) Return annotation for given transition(if annotation flag is set for given trans) #### Parameters $trans array $trans #### Returns `string` string #### Implementation of `phpMorphy_Fsa_Interface::getAnnot()`
`public boolean` | # `walk( mixed $start, string $word, boolean $readAnnot = true )` Find word in automat Find word in automat #### Parameters $start mixed $trans starting transition $word string $word $readAnnot bool $readAnnot read annot or simple check if word exists in automat #### Returns `boolean` TRUE if word is found, FALSE otherwise #### Implementation of `phpMorphy_Fsa_Interface::walk()`
`public` | # `collect( mixed $start, mixed $callback, boolean $readAnnot = true, string $path = '' )` Traverse automat and collect words For each found words $callback function invoked with follow arguments: call_user_func($callback, $word, $annot) when $readAnnot is FALSE then $annot arg is always NULL Traverse automat and collect words For each found words $callback function invoked with follow arguments: call_user_func($callback, $word, $annot) when $readAnnot is FALSE then $annot arg is always NULL #### Parameters $start mixed $startNode $callback mixed $callback callback function(in php format callback i.e. string or array(obj, method) or array(class, method) $readAnnot bool $readAnnot read annot $path string $path string to be append to all words #### Implementation of `phpMorphy_Fsa_Interface::collect()`
`public array` | # `readState( integer $index )` Read state at given index Read state at given index #### Parameters $index int $index #### Returns `array` array #### Implementation of `phpMorphy_Fsa_Interface::readState()`
`public array` | # `unpackTranses( mixed $transes )` Unpack transition from binary form to array Unpack transition from binary form to array #### Parameters $transes mixed $rawTranses may be array for convert more than one transitions #### Returns `array` array #### Implementation of `phpMorphy_Fsa_Interface::unpackTranses()`

### Magic methods summary

## Properties summary

`protected mixed` | $fsa | #

[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. -