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_Sparse_Shm extends phpMorphy_Fsa {
 27     function walk($trans, $word, $readAnnot = true) {
 28         $__shm = $this->resource['shm_id']; $__offset = $this->resource['offset']; $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             // sparse version
 37             $result = true;
 38              
 39             list(, $trans) = unpack('V', shmop_read($__shm, $__offset + ($fsa_start + (((($trans >> 10) & 0x3FFFFF) + $char + 1) << 2)), 4));
 40             
 41             if(($trans & 0x0200) || ($trans & 0xFF) != $char) {
 42                 $result = false;
 43             }
 44             // find char in state end
 45             /////////////////////////////////
 46             
 47             if(!$result) {
 48                 $trans = $prev_trans;
 49                 break;
 50             }
 51         }
 52         
 53         $annot = null;
 54         $result = false;
 55         $prev_trans = $trans;
 56         
 57         if($i >= $c) {
 58             // Read annotation when we walked all chars in word
 59             $result = true;
 60             
 61             if($readAnnot) {
 62                 // read annot trans
 63                  
 64                 list(, $trans) = unpack('V', shmop_read($__shm, $__offset + ($fsa_start + ((($trans >> 10) & 0x3FFFFF) << 2)), 4));
 65                 
 66                 if(0 == ($trans & 0x0100)) {
 67                     $result = false;
 68                 } else {
 69                     $annot = $this->getAnnot($trans);
 70                 }
 71             }
 72         }
 73         
 74         return array(
 75             'result' => $result,
 76             'last_trans' => $trans,
 77             'word_trans' => $prev_trans,
 78             'walked' => $i,
 79             'annot' => $annot
 80         );
 81     }
 82     
 83     function collect($startNode, $callback, $readAnnot = true, $path = '') {
 84         $total = 0;
 85         
 86         $stack = array();
 87         $stack_idx = array();
 88         $start_idx = 0;
 89         array_push($stack, null);
 90         array_push($stack_idx, null);
 91         
 92         $state = $this->readState((($startNode) >> 10) & 0x3FFFFF);
 93         
 94         do {
 95             for($i = $start_idx, $c = count($state); $i < $c; $i++) {
 96                 $trans = $state[$i];
 97                 
 98                 if(($trans & 0x0100)) {
 99                     $total++;
100                     
101                     if($readAnnot) {
102                         $annot = $this->getAnnot($trans);
103                     } else {
104                         $annot = $trans;
105                     }
106                     
107                     if(!call_user_func($callback, $path, $annot)) {
108                         return $total;
109                     }
110                 } else {
111                     $path .= chr(($trans & 0xFF));
112                     array_push($stack, $state);
113                     array_push($stack_idx, $i + 1);
114                     $state = $this->readState((($trans) >> 10) & 0x3FFFFF);
115                     $start_idx = 0;
116                     
117                     break;
118                 }
119             }
120             
121             if($i >= $c) {
122                 $state = array_pop($stack);
123                 $start_idx = array_pop($stack_idx);
124                 $path = $GLOBALS['__phpmorphy_substr']($path, 0, -1);
125             }
126         } while(!empty($stack));
127         
128         return $total;
129     }
130     
131     function readState($index) {
132         $__shm = $this->resource['shm_id']; $__offset = $this->resource['offset']; $fsa_start = $this->fsa_start;
133         
134         $result = array();
135         
136         $start_offset = $fsa_start + (($index) << 2);
137         
138         // first try read annot transition
139          
140         list(, $trans) = unpack('V', shmop_read($__shm, $__offset + ($start_offset), 4));
141         
142         if(($trans & 0x0100)) {
143             $result[] = $trans;
144         }
145         
146         // read rest
147         $start_offset += 4;
148         foreach($this->getAlphabetNum() as $char) {
149              
150             list(, $trans) = unpack('V', shmop_read($__shm, $__offset + ($start_offset + (($char) << 2)), 4));
151             
152 //            if(!($trans & 0x0200) && ($trans & 0xFF) == $char) {
153 // TODO: check term and empty flags at once i.e. $trans & 0x0300
154             if(!(($trans & 0x0200) || ($trans & 0x0100)) && ($trans & 0xFF) == $char) {
155 
156                 $result[] = $trans;
157             }
158         }
159         
160         return $result;
161     }
162     
163     function unpackTranses($rawTranses) {
164         settype($rawTranses, 'array');
165         $result = array();
166         
167         foreach($rawTranses as $rawTrans) {
168             $result[] = array(
169                 'term'  => ($rawTrans & 0x0100) ? true : false,
170                 'empty' => ($rawTrans & 0x0200) ? true : false,
171                 'attr'  => ($rawTrans & 0xFF),
172                 'dest'  => (($rawTrans) >> 10) & 0x3FFFFF,
173             );
174         }
175         
176         return $result;
177     }
178     
179     protected function readRootTrans() {
180         $__shm = $this->resource['shm_id']; $__offset = $this->resource['offset']; $fsa_start = $this->fsa_start;
181 
182          
183         list(, $trans) = unpack('V', shmop_read($__shm, $__offset + ($fsa_start + 4), 4));
184         
185         return $trans;
186     }
187     
188     protected function readAlphabet() {
189         $__shm = $this->resource['shm_id']; $__offset = $this->resource['offset']; $fsa_start = $this->fsa_start;
190         
191          
192         return shmop_read($__shm, $__offset + ($this->header['alphabet_offset']), $this->header['alphabet_size']);
193     }
194     
195     function getAnnot($trans) {
196         if(!($trans & 0x0100)) {
197             return null;
198         }
199         
200         $__shm = $this->resource['shm_id']; $__offset = $this->resource['offset']; $fsa_start = $this->fsa_start;
201         
202         $offset =
203             $this->header['annot_offset'] +
204             ((($trans & 0xFF) << 22) | (($trans >> 10) & 0x3FFFFF));
205         
206          
207         $len = ord(shmop_read($__shm, $__offset + ($offset), 1));
208         
209         if($len) {
210             $annot = shmop_read($__shm, $__offset + ($offset + 1), $len);
211         } else {
212             $annot = null;
213         }
214         
215         return $annot;
216     }
217     
218     function getAlphabetNum() {
219         if(!isset($this->alphabet_num)) {
220             $this->alphabet_num = array_map('ord', $this->getAlphabet());
221         }
222         
223         return $this->alphabet_num;
224     }
225     protected $alphabet_num; 
226 }
227 
[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