Webylon 3.2 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • 1c
    • exchange
      • catalog
  • auth
  • Booking
  • building
    • company
  • cart
    • shipping
    • steppedcheckout
  • Catalog
    • monument
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • Address
  • AddSubsiteTask
  • Announcement
  • AnnouncementDecorator
  • AnnouncementHolder
  • AssociatedFolderDecorator
  • AttachedFiles
  • AudioPhpCaptcha
  • AutoCompleteField
  • Base1CExchanger
  • BookingOrder_StatusLog
  • CalendarUtil
  • CalendarWidgetExtention
  • CatalogCatalogLinkedDecorator
  • CatalogOldFieldsDecorator
  • CatalogProductLinkedDecorator
  • CheckoutStep_ShippingMethod
  • ChequePayment
  • ClearHistoryTask
  • ClientEmailOrderNotification_SiteConfig
  • ClientVKOrderNotification_SiteConfig
  • CommentsSiteConfig
  • ContactsPage
  • CookieExtention
  • CostTableShippingRate
  • CustomMenu
  • CustomMenuAdmin
  • CustomMenuDecorator
  • CustomMenuHolder
  • CustomMenuItem
  • CustomPayment
  • DataObjectLoggerExtension
  • DataObjectSubsites
  • DefaultCMSActionDecorator
  • DocPage
  • DocumentDirection
  • DocumentHaving
  • DocumentSearchForm
  • DocumentSiteConfig
  • DocumentsPage
  • DocumentType
  • DOMUtil
  • ExtendPageAnnouncement
  • ExtendPagePoll
  • FavoriteExtention
  • FavoritePage
  • FavoriteProductMemberExtention
  • FavoriteProducts
  • FileOversizeDecorator
  • FindCyrillicSiteConfig
  • FolderRenameTask
  • GDMergeAlpha
  • HomePage
  • ImageAutoResize
  • ImageResizeTask
  • ImportCatalog1C_Importer
  • ImportCatalogSiteConfig
  • ImportSiteConfig
  • LoggerAdmin
  • LogItem
  • ManagerEmailOrderNotification_SiteConfig
  • MapObject
  • MapObjectGroup
  • MapPage
  • MediawebForm
  • MemberLoggerExtension
  • MonumentsSiteConfig
  • MultiUploadConfig
  • NearestEventExtention
  • NewDocumentsAdmin
  • NewsArchive
  • NewsEntry
  • NewsHolder
  • NewsSiteConfig
  • Order_StatusLog
  • Orders1CExchange_Exporter
  • PageHideFieldsExtension
  • PageInformerRates
  • PageInformerWeather
  • Payment_Failure
  • Payment_Processing
  • Payment_Result
  • Payment_Success
  • PaymentMethod
  • PaymentSiteConfig
  • PayPalPayment
  • PayPalPayment_Handler
  • PhoneField
  • PhotoAlbumExtentions
  • PhpCaptcha
  • PhpCaptchaColour
  • PhpCaptchaField
  • phpMorphy
  • phpMorphy_AncodesResolver_AsIs
  • phpMorphy_AncodesResolver_Proxy
  • phpMorphy_AncodesResolver_ToDialingAncodes
  • phpMorphy_AncodesResolver_ToText
  • phpMorphy_AnnotDecoder_Base
  • phpMorphy_AnnotDecoder_Common
  • phpMorphy_AnnotDecoder_Factory
  • phpMorphy_AnnotDecoder_Predict
  • phpMorphy_FilesBundle
  • phpMorphy_Fsa
  • phpMorphy_Fsa_Decorator
  • phpMorphy_Fsa_Proxy
  • phpMorphy_Fsa_Sparse_File
  • phpMorphy_Fsa_Sparse_Mem
  • phpMorphy_Fsa_Sparse_Shm
  • phpMorphy_Fsa_Tree_File
  • phpMorphy_Fsa_Tree_Mem
  • phpMorphy_Fsa_Tree_Shm
  • phpMorphy_Fsa_WordsCollector
  • phpMorphy_GramInfo
  • phpMorphy_GramInfo_AncodeCache
  • phpMorphy_GramInfo_Decorator
  • phpMorphy_Graminfo_File
  • phpMorphy_Graminfo_Mem
  • phpMorphy_GramInfo_Proxy
  • phpMorphy_GramInfo_Proxy_WithHeader
  • phpMorphy_GramInfo_RuntimeCaching
  • phpMorphy_Graminfo_Shm
  • phpMorphy_GrammemsProvider_Base
  • phpMorphy_GrammemsProvider_Decorator
  • phpMorphy_GrammemsProvider_Empty
  • phpMorphy_GrammemsProvider_Factory
  • phpMorphy_GrammemsProvider_ForFactory
  • phpMorphy_GrammemsProvider_ru_RU
  • phpMorphy_GramTab
  • phpMorphy_GramTab_Empty
  • phpMorphy_GramTab_Proxy
  • phpMorphy_Link
  • phpMorphy_Link_Annot
  • phpMorphy_Link_Base
  • phpMorphy_Morphier_Base
  • phpMorphy_Morphier_Bulk
  • phpMorphy_Morphier_Common
  • phpMorphy_Morphier_Empty
  • phpMorphy_Morphier_Finder_Base
  • phpMorphy_Morphier_Finder_Common
  • phpMorphy_Morphier_Finder_Predict_Databse
  • phpMorphy_Morphier_Finder_Predict_Suffix
  • phpMorphy_Morphier_Helper
  • phpMorphy_Morphier_Predict_Database
  • phpMorphy_Morphier_Predict_Suffix
  • phpMorphy_Morphier_PredictCollector
  • phpMorphy_Semaphore
  • phpMorphy_Semaphore_Empty
  • phpMorphy_Semaphore_Nix
  • phpMorphy_Semaphore_Win
  • phpMorphy_Shm_Cache
  • phpMorphy_Shm_Cache_FileDescriptor
  • phpMorphy_Shm_Header
  • phpMorphy_Source_Dba
  • phpMorphy_Source_Fsa
  • phpMorphy_State
  • phpMorphy_Storage
  • phpMorphy_Storage_Factory
  • phpMorphy_Storage_File
  • phpMorphy_Storage_Mem
  • phpMorphy_Storage_Proxy
  • phpMorphy_Storage_Shm
  • phpMorphy_UnicodeHelper
  • phpMorphy_UnicodeHelper_Base
  • phpMorphy_UnicodeHelper_MultiByteFixed
  • phpMorphy_UnicodeHelper_singlebyte
  • phpMorphy_UnicodeHelper_ucs_2be
  • phpMorphy_UnicodeHelper_ucs_2le
  • phpMorphy_UnicodeHelper_ucs_4be
  • phpMorphy_UnicodeHelper_ucs_4le
  • phpMorphy_UnicodeHelper_utf_16_Base
  • phpMorphy_UnicodeHelper_utf_16be
  • phpMorphy_UnicodeHelper_utf_16le
  • phpMorphy_UnicodeHelper_utf_32_Base
  • phpMorphy_UnicodeHelper_utf_32be
  • phpMorphy_UnicodeHelper_utf_32le
  • phpMorphy_UnicodeHelper_utf_8
  • phpMorphy_WordDescriptor
  • phpMorphy_WordDescriptor_Collection
  • phpMorphy_WordDescriptor_Collection_Serializer
  • phpMorphy_WordForm
  • ProductCatalogImportTask
  • ProductOldFieldsDecorator
  • ProductParamValue_BoolValueField
  • ProductParamValue_MultiValueField
  • ProductParamValue_MultiValueSetField
  • ProductParamValue_ValueField
  • ProductProductLinkedDecorator
  • PublHolder
  • Publication
  • PublicationSiteTree
  • RatingDataObject
  • RatingExtension
  • RealtySiteConfigDecorator
  • RecentComments
  • RecentFiles
  • RecentPages
  • RelatedPageLink
  • RoomRate_PriceField
  • RussianUpLower
  • SberbankPayment
  • SberbankPayment_Handler
  • SetMainSiteHomePageTypeTask
  • ShippingEstimator
  • ShippingPackage
  • ShowUserFromExtension
  • ShowViewedProductExtention
  • SiteConfigDecorator
  • SiteConfigSubsites
  • SiteTreeSubsites
  • SMSCOrderNotification_SiteConfig
  • SMSOrderNotification_SiteConfig
  • Socle
  • SocleSize
  • SortCMSActionDecorator
  • SS_Report_FakeQuery
  • SSMorphy
  • SSNController
  • SteppedCheckout_PageMessages
  • SubpageListField
  • SubscribeFormAllPagesExtension
  • SubsiteDropdownField
  • SubsiteReportWrapper
  • TableShippingRate
  • UnitellerPayment
  • UnitellerPayment_Handler
  • UnmoderatedComments
  • VAT
  • VideoManager
  • VideoSiteConfig
  • ViewedProductExtention
  • WatermarkImage
  • WatermarkSiteConfig
  • WeightTableShippingRate
  • XMLValidate
  • YaMoneyPayment
  • YaMoneyPayment_Handler
  • YMLExporter
  • YMLSiteConfig

Interfaces

  • PaymentObjectInterface
  • phpMorphy_AncodesResolver_Interface
  • phpMorphy_AnnotDecoder_Interface
  • phpMorphy_Fsa_Interface
  • phpMorphy_GramInfo_Interace
  • phpMorphy_GrammemsProvider_Interface
  • phpMorphy_GramTab_Interface
  • phpMorphy_Morphier_Finder_Interface
  • phpMorphy_Morphier_Interface
  • phpMorphy_Shm_Cache_Interface
  • phpMorphy_Source_Interface

Exceptions

  • phpMorphy_Exception

Functions

  • column_sort
  • column_sort_callback_basic
  • encodeFileForEmail
  • encodeMultipart
  • getMimeType
  • htmlEmail
  • loadMimeTypes
  • phpmorphy_overload_mb_funcs
  • plaintextEmail
  • processHeaders
  • QuotedPrintable_encode
  • supressOutput
  • validEmailAddr
  • wrapImagesInline
  • wrapImagesInline_rewriter
  1 <?php
  2  /**
  3  * This file is part of phpMorphy library
  4  *
  5  * Copyright c 2007-2008 Kamaev Vladimir <heromantor@users.sourceforge.net>
  6  *
  7  * This library is free software; you can redistribute it and/or
  8  * modify it under the terms of the GNU Lesser General Public
  9  * License as published by the Free Software Foundation; either
 10  * version 2 of the License, or (at your option) any later version.
 11  *
 12  * This library is distributed in the hope that it will be useful,
 13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 15  * Lesser General Public License for more details.
 16  *
 17  * You should have received a copy of the GNU Lesser General Public
 18  * License along with this library; if not, write to the
 19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 20  * Boston, MA 02111-1307, USA.
 21  */
 22 
 23 /**
 24  * This file is autogenerated at Wed, 14 Oct 2009 01:33:59 +0400, don`t change it!
 25  */
 26 class phpMorphy_Fsa_Tree_Mem extends phpMorphy_Fsa {
 27     function walk($trans, $word, $readAnnot = true) {
 28         $__mem = $this->resource; $fsa_start = $this->fsa_start;
 29         
 30         for($i = 0, $c = $GLOBALS['__phpmorphy_strlen']($word); $i < $c; $i++) {
 31             $prev_trans = $trans;
 32             $char = ord($word[$i]);
 33             
 34             /////////////////////////////////
 35             // find char in state begin
 36             // tree version
 37             $result = true;
 38             $start_offset = $fsa_start + ((($trans >> 11) & 0x1FFFFF) << 2);
 39             
 40             // read first trans in state
 41              
 42             list(, $trans) = unpack('V', $GLOBALS['__phpmorphy_substr']($__mem, $start_offset, 4));
 43             
 44             // If first trans is term(i.e. pointing to annot) then skip it
 45             if(($trans & 0x0100)) {
 46                 // When this is single transition in state then break
 47                 if(($trans & 0x0200) && ($trans & 0x0400)) {
 48                     $result = false;
 49                 } else {
 50                     $start_offset += 4;
 51                      
 52                     list(, $trans) = unpack('V', $GLOBALS['__phpmorphy_substr']($__mem, $start_offset, 4));
 53                 }
 54             }
 55             
 56             // if all ok process rest transitions in state
 57             if($result) {
 58                 // walk through state
 59                 for($idx = 1, $j = 0; ; $j++) {
 60                     $attr = ($trans & 0xFF);
 61                     
 62                     if($attr == $char) {
 63                         $result = true;
 64                         break;
 65                     } else if($attr > $char) {
 66                         if(($trans & 0x0200)) {
 67                             $result = false;
 68                             break;
 69                         }
 70                         
 71                         $idx = $idx << 1;
 72                     } else {
 73                         if(($trans & 0x0400)) {
 74                             $result = false;
 75                             break;
 76                         }
 77                         
 78                         $idx = ($idx << 1) + 1;
 79                     }
 80                     
 81                     if($j > 255) {
 82                         throw new phpMorphy_Exception('Infinite recursion possible');
 83                     }
 84             
 85                      
 86                     // read next trans
 87                      
 88                     list(, $trans) = unpack('V', $GLOBALS['__phpmorphy_substr']($__mem, $start_offset + (($idx - 1) << 2), 4));
 89                 }
 90             }
 91             
 92             // find char in state end
 93             /////////////////////////////////
 94             
 95             if(!$result) {
 96                 $trans = $prev_trans;
 97                 break;
 98             }
 99         }
100         
101         $annot = null;
102         $result = false;
103         $prev_trans = $trans;
104         
105         if($i >= $c) {
106             // Read annotation when we walked all chars in word
107             $result = true;
108             
109             if($readAnnot) {
110                 // read annot trans
111                  
112                 list(, $trans) = unpack('V', $GLOBALS['__phpmorphy_substr']($__mem, $fsa_start + ((($trans >> 11) & 0x1FFFFF) << 2), 4));
113                 
114                 if(0 == ($trans & 0x0100)) {
115                     $result = false;
116                 } else {
117                     $annot = $this->getAnnot($trans);
118                 }
119             }
120         }
121         
122         return array(
123             'result' => $result,
124             'last_trans' => $trans,
125             'word_trans' => $prev_trans,
126             'walked' => $i,
127             'annot' => $annot
128         );
129     }
130     
131     function collect($startNode, $callback, $readAnnot = true, $path = '') {
132         $total = 0;
133         
134         $stack = array();
135         $stack_idx = array();
136         $start_idx = 0;
137         array_push($stack, null);
138         array_push($stack_idx, null);
139         
140         $state = $this->readState((($startNode) >> 11) & 0x1FFFFF);
141         
142         do {
143             for($i = $start_idx, $c = count($state); $i < $c; $i++) {
144                 $trans = $state[$i];
145                 
146                 if(($trans & 0x0100)) {
147                     $total++;
148                     
149                     if($readAnnot) {
150                         $annot = $this->getAnnot($trans);
151                     } else {
152                         $annot = $trans;
153                     }
154                     
155                     if(!call_user_func($callback, $path, $annot)) {
156                         return $total;
157                     }
158                 } else {
159                     $path .= chr(($trans & 0xFF));
160                     array_push($stack, $state);
161                     array_push($stack_idx, $i + 1);
162                     $state = $this->readState((($trans) >> 11) & 0x1FFFFF);
163                     $start_idx = 0;
164                     
165                     break;
166                 }
167             }
168             
169             if($i >= $c) {
170                 $state = array_pop($stack);
171                 $start_idx = array_pop($stack_idx);
172                 $path = $GLOBALS['__phpmorphy_substr']($path, 0, -1);
173             }
174         } while(!empty($stack));
175         
176         return $total;
177     }
178     
179     function readState($index) {
180         $__mem = $this->resource; $fsa_start = $this->fsa_start;
181         
182         $result = array();
183         
184         $offset = $fsa_start + (($index) << 2);
185         
186         // read first trans
187          
188         list(, $trans) = unpack('V', $GLOBALS['__phpmorphy_substr']($__mem, $offset, 4));
189         
190         // check if first trans is pointer to annot, and not single in state
191         if(($trans & 0x0100) && !(($trans & 0x0200) || ($trans & 0x0400))) {
192             $result[] = $trans;
193             
194             list(, $trans) = unpack('V', $GLOBALS['__phpmorphy_substr']($__mem, $offset, 4));
195             $offset += 4;
196         }
197         
198         // read rest
199         for($expect = 1; $expect; $expect--) {
200             if(!($trans & 0x0200)) $expect++;
201             if(!($trans & 0x0400)) $expect++;
202             
203             $result[] = $trans;
204             
205             if($expect > 1) {
206                 list(, $trans) = unpack('V', $GLOBALS['__phpmorphy_substr']($__mem, $offset, 4));
207                 $offset += 4;
208             }
209         }
210         
211         return $result;
212     }
213     
214     function unpackTranses($rawTranses) {
215         settype($rawTranses, 'array');
216         $result = array();
217         
218         foreach($rawTranses as $rawTrans) {
219             $result[] = array(
220                 'term'  => ($rawTrans & 0x0100) ? true : false,
221                 'llast' => ($rawTrans & 0x0200) ? true : false,
222                 'rlast' => ($rawTrans & 0x0400) ? true : false,
223                 'attr'  => ($rawTrans & 0xFF),
224                 'dest'  => (($rawTrans) >> 11) & 0x1FFFFF,
225             );
226         }
227         
228         return $result;
229     }
230     
231     protected function readRootTrans() {
232         $__mem = $this->resource; $fsa_start = $this->fsa_start;
233 
234          
235         list(, $trans) = unpack('V', $GLOBALS['__phpmorphy_substr']($__mem, $fsa_start + 0, 4));
236         
237         return $trans;
238     }
239     
240     protected function readAlphabet() {
241         $__mem = $this->resource; $fsa_start = $this->fsa_start;
242         
243          
244         return $GLOBALS['__phpmorphy_substr']($__mem, $this->header['alphabet_offset'], $this->header['alphabet_size']);
245     }
246     
247     function getAnnot($trans) {
248         if(!($trans & 0x0100)) {
249             return null;
250         }
251         
252         $__mem = $this->resource; $fsa_start = $this->fsa_start;
253         
254         $offset =
255             $this->header['annot_offset'] +
256             ((($trans & 0xFF) << 21) | (($trans >> 11) & 0x1FFFFF));
257         
258          
259         $len = ord($GLOBALS['__phpmorphy_substr']($__mem, $offset, 1));
260         
261         if($len) {
262             $annot = $GLOBALS['__phpmorphy_substr']($__mem, $offset + 1, $len);
263         } else {
264             $annot = null;
265         }
266         
267         return $annot;
268     }
269     
270  
271 }
272 
[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. -
Webylon 3.2 API Docs API documentation generated by ApiGen 2.8.0