| |||
![]() | |||
| Recent news articles | Bird | Some articles from FAQ |
| [June 29, 2012]
Version 3.4.2 released. Class curl supports three new options: verbose, stderr and maxfilesize. Added constructor ^date::today[] that creates date object for today's midnight (00:00:00). Method ^date.sql-string[] supports options “datetime”, “date” and “time”. It returns date + time, date only and time only respectively. Constructor ^file::create[...] supports binary format as well. Constructor ^file::create[...] now also supports another format: ^file::create[string or file[;$.name[file name] $.mode[text|binary] $.content-type[...] $.charset[...]]]. Constructor ^file::create[text;...;content] normalizes end of lines (EOLs) in the content. While creating binary objects the EOLs normalization does not occur. Methods ^file:dirname[filespec], ^file:basename[filespec], ^file:justname[filespec] and ^file:justext[filespec] handle filespecs in windows format. Methods ^file:dirname[filespec] and ^file:basename[filespec] work exactly as *nix commands of the same names. Constructor ^file::load[...;http://...] parses incoming cookies and stores them in a field cookies–table with columns name, value, expires, max-age, domain, path, httponly and secure. Constructor ^file::base64[encoded;options] and method ^string:base64[encoded;options] accept an option $.strict(true). If the option is specified the exception will be thrown if decoding all characters is not possible. Without this option they return the only characters that were decoded successfully. While base64-decoding memory usage is reduced. In the body of ^hash.foreach method it is possible to call some methods of iterated hash (such as ^hash._count[], ^hash._keys[], ^hash.contains[key] and ^hash._at[...]). It does not cause an exception “hash flocked” any longer. Method ^json:string[object;options] searches method that was specified using $.class-name[$method] option through all the ancestors as well. Method ^json:string[object;options] can serializes objects of class xdoc. Parameters for converting xdoc into string can be passed into $.xdoc[] option. Method ^json:string[object;options] accepts value stat in addition to values text and base64 as a content of $.file[] option. Method ^json:string[object;options] accepts an option $._default[$method]. Using this option you can specify user-defined method that will be used for serializing all objects of user-defined classes. Method ^json:parse[json-string;options] accepts an option $.array[$method] that will be used for processing all arrays. Method ^json:parse[json-string;options] accepts an option $.taint[transformation type]. The specified transformation type will be applied for every string in resulting hash. Method ^json:parse[json-string;options] parses all numbers as double. The range for ^math:convert[...] has been increased. Overflowing during convertion causes an exception. Parser has native memcached servers support (using libmemcached library). Added method ^reflection:uid[object] that returns a unique object's identifier. Added method ^reflection:delete[class or object;field name] that can be used for deleting object's field (the method has the same functionality as ^hash.delete[key], but works with user-defined classes and objects). Methods ^reflection:method[class or object;method name] and ^reflection:field[class or object;field name] are added. Using these methods you can access method or field of class or object. Method ^string.match[] handles unicode properties in character classes \w etc if worked in UTF8. Method ^string.replace[...] can be called with two parameters: “search string” and “replace string”. Method ^table.count[] accepts options. Called with an option columns it returns a number of columns in the named table (works as: $c[^table.columns[]]^c.count[]). Called with an option cells it returns a number of cells in the current row. Called with an option rows it returns a number of rows in the table (works exactly as ^table.count[]). Method ^table.select(expression)[options] accepts negative values in $.offset option. In this case the rows are counted from the end of the table (-1 means the last row). DOM-methods createElement, createElementNS, createAttribute, createAttributeNS, createEntityReference, getAttribute, getAttributeNS, setAttribute, setAttributeNS, removeAttribute, removeAttributeNS, getAttributeNode, getAttributeNodeNS, hasAttribute, hasAttributeNS, getElementById, getElementsByTagName, getElementsByTagNameNS validate incoming parameters. Method ^xdoc.file[options] accepts a new option $.name[file name]. Methods ^xdoc.string[options] and ^xdoc.file[options] accept a new option $.charset[] that works exactly as an option $.encoding[]. You can not specify both of these options however. If a ^switch or a ^case have bool value they will be compared as bool (they were compared as double before). Calling operators ^break[] and ^continue[] outside of cycles throws exceptions «parser.break» and «parser.continue» respectively instead of «parser.runtime». By specifying $STRICT-VARS(true) in configuration method of MAIN (@conf[]) you can switch strict vars mode on. In this mode the access to uninitialized variables will cause an exception. Transformation type file-spec does not replace “'” (apostrophe) character any longer (it was replaced by “_26” before). MySQL driver accepts a new option local_infile=1 that can be used for switching on the support of LOAD DATA LOCAL if MySQL server was compiled without --enable-local-infile option (more details). The latest versions of libraries are included: PCRE (8.30) and libxml2 (2.8.0). A number of bugs were fixed. | ![]() | What is Parser? What is it for, anyway? There is PHP, what Parser is for?
I programmed in other languages, in short, what is so convenient in Parser? @header[] ... @footer[] ... @navigation[] ... @body[] ... My browser displays Parser code, not its result. What's wrong (I am using Apache web-server)?
Parser/3.x.xIf you can see it, that means Parser is uploaded where it should have been, and its rights are set correctly. If you have uploaded parser correctly, and you have not forgotten to put directives specified in documentation to .htaccess, you may have forgotten to allow Apache to process .htaccess in httpd.conf file by directive AllowOverride (see Apache documentation). To check whether .htaccess is processed, put there some arbitrary wrong instruction, say «mytest», to the very beginning of it. If, after page reload you do NOT see 500 error (which must appear if you configured everything right), that means you have .htaccess file ignored. Change AllowOverride directive or turn to your administrator. |
|
| E-mail: mailbox@parser.ru | Copyright © 1997–2011 Art Lebedev Studio |