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

Packages

  • auth
  • Booking
  • cart
    • shipping
    • steppedcheckout
  • Catalog
  • 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
  • BaseMediawebImportParser
  • BookingOrder_StatusLog
  • CalendarUtil
  • CalendarWidgetExtention
  • CatalogCatalogLinkedDecorator
  • CatalogImportTask
  • CatalogOldFieldsDecorator
  • CatalogProductLinkedDecorator
  • CheckoutStep_ShippingMethod
  • ChequePayment
  • ClearHistoryTask
  • ClientEmailOrderNotification_SiteConfig
  • ClientVKOrderNotification_SiteConfig
  • CommentsSiteConfig
  • ContactsPage
  • CookieExtention
  • CostTableShippingRate
  • CustomMenu
  • CustomMenuAdmin
  • CustomMenuDecorator
  • CustomMenuHolder
  • CustomMenuItem
  • CustomPayment
  • DataObjectLoggerExtension
  • DataObjectSubsites
  • DefaultCMSActionDecorator
  • DeleteOldAssociatedFoldersTask
  • DocPage
  • DocumentDirection
  • DocumentHaving
  • DocumentSearchForm
  • DocumentSiteConfig
  • DocumentsPage
  • DocumentType
  • DOMUtil
  • ExtendPageAnnouncement
  • ExtendPageNews
  • ExtendPagePoll
  • FileOversizeDecorator
  • FindCyrillicSiteConfig
  • FolderRenameTask
  • GDMergeAlpha
  • HomePage
  • ImageAutoResize
  • ImageResizeTask
  • ImportAdmin
  • ImportAutoStartTask
  • ImportCatalogMessage
  • ImportConfig
  • ImportLog
  • ImportSiteConfig
  • ImportTask
  • LoggerAdmin
  • LogItem
  • ManagerEmailOrderNotification_SiteConfig
  • MapObject
  • MapObjectGroup
  • MapPage
  • MediawebForm
  • MediawebImportParser
  • MemberLoggerExtension
  • MultiUploadConfig
  • NearestEventExtention
  • NewDocumentsAdmin
  • News_Controller
  • NewsEntry
  • NewsEntry_Controller
  • NewsHolder
  • NewsHolder_Controller
  • NewsLiveCalendarWidget
  • NewsSiteConfig
  • Order_StatusLog
  • Orders1CExchange
  • 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
  • ProductImportV1Decorator
  • ProductOldFieldsDecorator
  • ProductProductLinkedDecorator
  • PublHolder
  • Publication
  • PublicationSiteTree
  • RatingDataObject
  • RatingExtension
  • RealtySiteConfigDecorator
  • RecentComments
  • RecentFiles
  • RecentPages
  • RelatedPageLink
  • RepairImportTask
  • RoomRate_PriceField
  • RussianUpLower
  • SberbankPayment
  • SberbankPayment_Handler
  • SetMainSiteHomePageTypeTask
  • ShippingEstimator
  • ShippingPackage
  • ShowUserFromExtension
  • SiteConfigDecorator
  • SiteConfigSubsites
  • SiteTreeSubsites
  • SMSCOrderNotification_SiteConfig
  • SMSOrderNotification_SiteConfig
  • SortCMSActionDecorator
  • SS_Report_FakeQuery
  • SSMorphy
  • SSNController
  • SteppedCheckout_PageMessages
  • SubpageListField
  • SubscribeFormAllPagesExtension
  • SubsiteDropdownField
  • SubsiteReportWrapper
  • TableShippingRate
  • UnitellerPayment
  • UnitellerPayment_Handler
  • UnmoderatedComments
  • VideoManager
  • VideoSiteConfig
  • WatermarkImage
  • WatermarkSiteConfig
  • WebylonImportAdmin
  • WebylonImportCatalog
  • WeightTableShippingRate
  • XMLValidate
  • YaMoneyPayment
  • YaMoneyPayment_Handler
  • YMLExporter
  • YMLSiteConfig

Interfaces

  • ImportInterface
  • 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
  • validateError
  • 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:34:00 +0400, don`t change it!
 25  */
 26 class phpMorphy_Graminfo_File extends phpMorphy_Graminfo {
 27     function getGramInfoHeaderSize() {
 28         return 20;
 29     }
 30 
 31     function readGramInfoHeader($offset) {
 32         $__fh = $this->resource;
 33         fseek($__fh, $offset); 
 34         
 35         $result = unpack(
 36             'vid/vfreq/vforms_count/vpacked_forms_count/vancodes_count/vancodes_offset/vancodes_map_offset/vaffixes_offset/vaffixes_size/vbase_size',
 37             fread($__fh, 20) 
 38         );
 39         
 40         $result['offset'] = $offset;
 41         
 42         return $result;
 43     }
 44 
 45     protected function readAncodesMap($info) {
 46         $__fh = $this->resource;
 47         
 48         // TODO: this can be wrong due to aligning ancodes map section
 49         $offset = $info['offset'] + 20 + $info['forms_count'] * 2;
 50                 
 51         fseek($__fh, $offset); 
 52             
 53         $forms_count = $info['packed_forms_count'];
 54         return unpack("v$forms_count",  fread($__fh, $forms_count * 2));
 55     }
 56 
 57     protected function splitAncodes($ancodes, $map) {
 58         $result = array();
 59         for($i = 1, $c = count($map), $j = 1; $i <= $c; $i++) {
 60             $res = array();
 61             
 62             for($k = 0, $kc = $map[$i]; $k < $kc; $k++, $j++) {
 63                 $res[] = $ancodes[$j];
 64             }
 65             
 66             $result[] = $res;
 67         }
 68 
 69         return $result;
 70     }
 71     
 72     function readAncodes($info) {
 73         $__fh = $this->resource;
 74         
 75         // TODO: this can be wrong due to aligning ancodes section
 76         $offset = $info['offset'] + 20;
 77 
 78         fseek($__fh, $offset); 
 79             
 80         $forms_count = $info['forms_count'];
 81         $ancodes = unpack("v$forms_count", fread($__fh, $forms_count * 2));
 82 
 83         /*
 84         if(!$expand) {
 85             return $ancodes;
 86         }
 87         */
 88 
 89         $map = $this->readAncodesMap($info);
 90         
 91         return $this->splitAncodes($ancodes, $map);
 92     }
 93     
 94     function readFlexiaData($info) {
 95         $__fh = $this->resource;
 96         
 97         $offset = $info['offset'] + 20;
 98 
 99         if(isset($info['affixes_offset'])) {
100             $offset += $info['affixes_offset'];
101         } else {
102             $offset += $info['forms_count'] * 2 + $info['packed_forms_count'] * 2;
103         }
104         
105         fseek($__fh, $offset); 
106         return explode($this->ends, fread($__fh, $info['affixes_size'] - $this->ends_size));
107     }
108     
109     function readAllGramInfoOffsets() {
110         return $this->readSectionIndex($this->header['flex_index_offset'], $this->header['flex_count']);
111     }
112 
113     protected function readSectionIndex($offset, $count) {
114         $__fh = $this->resource;
115         
116         fseek($__fh, $offset); 
117         
118         return array_values(unpack("V$count", fread($__fh, $count * 4)));
119     }
120 
121     function readAllFlexia() {
122         $__fh = $this->resource;
123         
124         $result = array();
125         
126         $offset = $this->header['flex_offset'];
127         
128         foreach($this->readSectionIndexAsSize($this->header['flex_index_offset'], $this->header['flex_count'], $this->header['flex_size']) as $size) {
129             $header = $this->readGramInfoHeader($offset);
130             $affixes = $this->readFlexiaData($header);
131             $ancodes = $this->readAncodes($header, true);
132 
133             $result[$header['id']] = array(
134                 'header' => $header,
135                 'affixes' => $affixes,
136                 'ancodes' => $ancodes
137             );
138 
139             $offset += $size;
140         }
141         
142         return $result;
143     }
144     
145     function readAllPartOfSpeech() {
146         $__fh = $this->resource;
147         
148         $result = array();
149         
150         $offset = $this->header['poses_offset'];
151         
152         foreach($this->readSectionIndexAsSize($this->header['poses_index_offset'], $this->header['poses_count'], $this->header['poses_size']) as $size) {
153             fseek($__fh, $offset); 
154             
155             $res = unpack(
156                 'vid/Cis_predict',
157                 fread($__fh, 3) 
158             );
159             
160             $result[$res['id']] = array(
161                 'is_predict' => (bool)$res['is_predict'],
162                 'name' => $this->cleanupCString(fread($__fh, $size - 3))
163             );
164 
165             $offset += $size;
166         }
167         
168         return $result;
169     }
170     
171     function readAllGrammems() {
172         $__fh = $this->resource;
173         
174         $result = array();
175         
176         $offset = $this->header['grammems_offset'];
177         
178         foreach($this->readSectionIndexAsSize($this->header['grammems_index_offset'], $this->header['grammems_count'], $this->header['grammems_size']) as $size) {
179             fseek($__fh, $offset); 
180             
181             $res = unpack(
182                 'vid/Cshift',
183                 fread($__fh, 3) 
184             );
185             
186             $result[$res['id']] = array(
187                 'shift' => $res['shift'],
188                 
189                 'name' => $this->cleanupCString(fread($__fh, $size - 3))
190             );
191 
192             $offset += $size;
193         }
194         
195         return $result;
196     }
197 
198     function readAllAncodes() {
199         $__fh = $this->resource;
200         
201         $result = array();
202         
203         $offset = $this->header['ancodes_offset'];
204         fseek($__fh, $offset); 
205         
206         for($i = 0; $i < $this->header['ancodes_count']; $i++) {
207             $res = unpack('vid/vpos_id', fread($__fh, 4));
208             $offset += 4;
209             
210             list(, $grammems_count) = unpack('v', fread($__fh, 2));
211             $offset += 2;
212             
213             $result[$res['id']] = array(
214                 'pos_id' => $res['pos_id'],
215                 'grammem_ids' => $grammems_count ? 
216                     array_values(unpack("v$grammems_count", fread($__fh, $grammems_count * 2))) :
217                     array(),
218                 'offset' => $offset,
219             );
220             
221             $offset += $grammems_count * 2;
222         }
223 
224         return $result;
225     }   
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.1 API Docs API documentation generated by ApiGen 2.8.0