.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt .. role:: underline ==================== EXT: Oblady - PHP JS ==================== :Created: 2010-02-18T17:33:18 :Changed: 2011-06-21T10:11:34 :Classification: oblady_phpjs :Description: The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ---- :Keywords: oblady_phpjs :Author: Adrien LUCAS :Email: adrien@oblady.fr :Info 4: :Language: en |img-1| |img-2| EXT: Oblady - PHP JS - oblady\_phpjs .. _EXT-Oblady-PHP-JS: EXT: Oblady - PHP JS ==================== Extension Key: oblady\_phpjs Language: en Keywords: oblady\_phpjs Copyright 2000-2010, Adrien LUCAS, Contributions : Sebastien Thibault Vincent Barral This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to TYPO3 a GNU/GPL CMS/Framework available from www.typo3.org .. _Table-of-Contents: Table of Contents ----------------- `EXT: Oblady - PHP JS 1 <#1.EXT:%20Oblady%20-%20PHP%20JS|outline>`_ **`Introduction 3 <#1.1.Introduction|outline>`_** `What does it do? 3 <#1.1.1.What%20does%20it%20do_|outline>`_ **`Administration 4 <#1.2.Administration|outline>`_** **`Configuration 5 <#1.3.Configuration|outline>`_** `Override configuration by TS 5 <#1.3.1.Override%20configuration%20by%20TS|outline>`_ **`Example 6 <#1.4.Example|outline>`_** **`ChangeLog 7 <#1.5.ChangeLog|outline>`_** `ToDo list : 7 <#1.5.1.ToDo%20list%20:|outline>`_ **`List of supported functions 8 <#1.6.List%20of%20supported%20functions|outline>`_** `Arrays 8 <#1.0.0.Arrays%20|outline>`_ `BCMath Arbitrary Precision Mathematics 8 <#1.0.0.BCMath%20Arbitrary%20Precision%20Mathematics%20|outline>`_ `Character type checking 9 <#1.0.0.Character%20type%20checking%20|outline>`_ `Class/Object Information 9 <#1.0.0.Class/Object%20Information%20|outline>`_ `Classkit 9 <#1.0.0.Classkit%20|outline>`_ `Date and Time 9 <#1.0.0.Date%20and%20Time%20|outline>`_ `Error Handling and Logging 9 <#1.0.0.Error%20Handling%20and%20Logging%20|outline>`_ `Filesystem 10 <#1.0.0.Filesystem%20|outline>`_ `Function Handling 10 <#1.0.0.Function%20Handling%20|outline>`_ `JavaScript Object Notation 10 <#1.0.0.JavaScript%20Object%20Notation%20|outline>`_ `Language & Control Structures 10 <#1.0.0.Language%20&%20Control%20Structures%20|outline>`_ `Mail 10 <#1.0.0.Mail%20|outline>`_ `Mathematical Functions 11 <#1.0.0.Mathematical%20Functions%20|outline>`_ `Miscellaneous Functions 11 <#1.0.0.Miscellaneous%20Functions%20|outline>`_ `Net Gopher 11 <#1.0.0.Net%20Gopher%20|outline>`_ `Network 11 <#1.0.0.Network%20|outline>`_ `Object Aggregation/Composition 11 <#1.0.0.Object%20Aggregation/Composition%20|outline>`_ `Output Buffering Control 12 <#1.0.0.Output%20Buffering%20Control%20|outline>`_ `PHP Options and Information 12 <#1.0.0.PHP%20Options%20and%20Information|outline>`_ `Program execution Functions 12 <#1.0.0.Program%20execution%20Functions%20|outline>`_ `Regular Expressions (Perl-Compatible) 12 <#1.0.0.Regular%20Expressions%20(Perl-Compatible)%20|outline>`_ `Streams 12 <#1.0.0.Streams%20|outline>`_ `Strings 13 <#1.0.0.Strings%20|outline>`_ `URLs 13 <#1.0.0.URLs%20|outline>`_ `Variable handling 14 <#1.0.0.Variable%20handling%20|outline>`_ `XML Parser 14 <#1.0.0.XML%20Parser%20|outline>`_ `i18n 14 <#1.0.0.i18n%20|outline>`_ `runkit 14 <#1.0.0.runkit%20|outline>`_ `xdiff 14 <#1.0.0.xdiff%20|outline>`_ **`TODO 15 <#1.7.TODO|outline>`_** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ This extension adds to TYPO3 a collection of javascript written PHP functions. This mean you can call some PHP core functions directly from your javascript codes. .. _Administration: Administration -------------- - Install “oblady\_phpjs” using the Extension Manager. No database updates needed. - Configure the extension in the Extension Manager too. - Add the extension's plugin as an element of your PAGE object : :: page.headerData.22 = USER page.headerData.22.includeLibs = EXT:oblady_phpjs/pi1/class.tx_obladyphpjs_pi1.php page.headerData.22.userFunc = tx_obladyphpjs_pi1->main Optional : Update the sources (re-generate compiled/minified files), point your browser to: :: http://www.domainname.com/typo3conf/ext/oblady_phpjs/Resources/phpjs.org/tools/compile.php .. _Configuration: Configuration ------------- Here are the available configuration options : .. ### BEGIN~OF~TABLE ### .. _set-function-loader: set\_function\_loader ^^^^^^^^^^^^^^^^^^^^^ .. container:: table-row Property set\_function\_loader Data type boolean Description If set, the plugin will print some javascript to declare the “libphp\_i()” function wich is the function loader. Default true .. _preload-functions: preload\_functions ^^^^^^^^^^^^^^^^^^ .. container:: table-row Property preload\_functions Data type string Description A list of functions to preload, You have to set the previous option to true. Default .. ###### END~OF~TABLE ###### .. _Override-configuration-by-TS: Override configuration by TS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Coming soon... .. _Example: Example ------- :: :underline:`Note` : The md5 function depends on the utf8\_encode function which is then automatically loaded. .. _ChangeLog: ChangeLog --------- .. ### BEGIN~OF~TABLE ### .. _1-0: 1.0 ^^^ .. container:: table-row Version 1.0 Changes June 13th 2011 - First beta release .. ###### END~OF~TABLE ###### .. _ToDo-list: ToDo list : ^^^^^^^^^^^ Stable release, Configuration overriding by Typoscript. Independent functions pre-loading. Better integration of the “update sources” feature. .. _List-of-supported-functions: List of supported functions --------------------------- All function's codes are from phpjs.org .. _Arrays: Arrays ^^^^^^ .. ### BEGIN~OF~TABLE ### .. _array-intersect-ukey: array\_intersect\_ukey """""""""""""""""""""" .. container:: table-row a array\_intersect\_ukey array\_key\_exists array\_keys array\_map array\_merge array\_merge\_recursive array\_multisort array\_pad array\_pop array\_product array\_push array\_rand array\_reduce array\_replace array\_replace\_recursive array\_reverse array\_search array\_shift array\_slice array\_splice b array\_sum array\_udiff array\_udiff\_assoc array\_udiff\_uassoc array\_uintersect array\_uintersect\_assoc array\_uintersect\_uassoc array\_unique array\_unshift array\_values array\_walk array\_walk\_recursive arsort asort compact count current each end extract c in\_array key krsort ksort natcasesort natsort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort .. ###### END~OF~TABLE ###### .. _BCMath-Arbitrary-Precision-Mathematics: BCMath Arbitrary Precision Mathematics ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _bcadd: bcadd """"" .. container:: table-row a bcadd bccomp bcdiv bcmul b bcround bcscale bcsub .. ###### END~OF~TABLE ###### .. _Character-type-checking: Character type checking ^^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _ctype-alnum: ctype\_alnum """""""""""" .. container:: table-row a ctype\_alnum ctype\_alpha ctype\_cntrl ctype\_digit ctype\_graph ctype\_lower b ctype\_print ctype\_punct ctype\_space ctype\_upper ctype\_xdigit .. ###### END~OF~TABLE ###### .. _Class-Object-Information: Class/Object Information ^^^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _class-alias: class\_alias """""""""""" .. container:: table-row a class\_alias class\_exists get\_class get\_class\_methods get\_class\_vars b get\_declared\_classes get\_object\_vars method\_exists property\_exists .. ###### END~OF~TABLE ###### .. _Classkit: Classkit ^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _classkit-import: classkit\_import """""""""""""""" .. container:: table-row a classkit\_import classkit\_method\_add classkit\_method\_copy b classkit\_method\_redefine classkit\_method\_remove classkit\_method\_rename .. ###### END~OF~TABLE ###### .. _Date-and-Time: Date and Time ^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _checkdate: checkdate """"""""" .. container:: table-row a checkdate date date\_default\_timezone\_get date\_default\_timezone\_set date\_parse getdate gettimeofday gmdate gmmktime gmstrftime b localtime microtime mktime strftime strptime strtotime time timezone\_abbreviations\_list timezone\_identifiers\_list idate .. ###### END~OF~TABLE ###### .. _Error-Handling-and-Logging: Error Handling and Logging ^^^^^^^^^^^^^^^^^^^^^^^^^^ error\_get\_last error\_reporting trigger\_error user\_error .. _Filesystem: Filesystem ^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _basename: basename """""""" .. container:: table-row a basename dirname fclose feof fgetc fgetcsv fgets fgetss file file\_exists file\_get\_contents filemtime filesize b fopen fpassthru fread fscanf fseek ftell pathinfo pclose popen readfile realpath rewind .. ###### END~OF~TABLE ###### .. _Function-Handling: Function Handling ^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _call-user-func: call\_user\_func """""""""""""""" .. container:: table-row a call\_user\_func call\_user\_func\_array create\_function forward\_static\_call forward\_static\_call\_array func\_get\_arg b func\_get\_args func\_num\_args function\_exists get\_defined\_functions register\_shutdown\_function .. ###### END~OF~TABLE ###### .. _JavaScript-Object-Notation: JavaScript Object Notation ^^^^^^^^^^^^^^^^^^^^^^^^^^ json\_decode json\_encode json\_last\_error .. _Language-Control-Structures: Language & Control Structures ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ include include\_once require require\_once .. _Mail: Mail ^^^^ mail .. _Mathematical-Functions: Mathematical Functions ^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _abs: abs """ .. container:: table-row a abs acos acosh asin asinh atan atan2 atanh base\_convert bindec ceil cos cosh decbin dechex decoct b deg2rad exp expm1 floor fmod getrandmax hexdec hypot is\_finite is\_infinite is\_nan lcg\_value log log10 log1p max c min mt\_getrandmax mt\_rand octdec pi pow rad2deg rand round sin sinh sqrt tan tanh .. ###### END~OF~TABLE ###### .. _Miscellaneous-Functions: Miscellaneous Functions ^^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _constant: constant """""""" .. container:: table-row a constant define defined pack b php\_strip\_whitespace time\_sleep\_until uniqid .. ###### END~OF~TABLE ###### .. _Net-Gopher: Net Gopher ^^^^^^^^^^ gopher\_parsedir .. _Network: Network ^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _inet-ntop: inet\_ntop """""""""" .. container:: table-row a inet\_ntop inet\_pton ip2long b long2ip setcookie setrawcookie .. ###### END~OF~TABLE ###### .. _Object-Aggregation-Composition: Object Aggregation/Composition ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _aggregate: aggregate """"""""" .. container:: table-row a aggregate aggregate\_info aggregate\_methods aggregate\_methods\_by\_list aggregate\_methods\_by\_regexp b aggregate\_properties aggregate\_properties\_by\_list aggregate\_properties\_by\_regexp aggregation\_info deaggregate .. ###### END~OF~TABLE ###### .. _Output-Buffering-Control: Output Buffering Control ^^^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _ob-clean: ob\_clean """"""""" .. container:: table-row a ob\_clean ob\_end\_clean ob\_end\_flush ob\_flush ob\_get\_clean ob\_get\_contents b ob\_get\_flush ob\_get\_length ob\_get\_level ob\_get\_status ob\_list\_handlers ob\_start .. ###### END~OF~TABLE ###### .. _PHP-Options-and-Information: PHP Options and Information ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _assert: assert """""" .. container:: table-row a assert assert\_options get\_cfg\_var get\_defined\_constants get\_extension\_funcs get\_include\_path get\_included\_files get\_required\_files getenv getlastmod ini\_alter ini\_get b ini\_get\_all ini\_restore ini\_set php\_ini\_loaded\_file php\_ini\_scanned\_files phpversion putenv restore\_include\_path set\_include\_path set\_time\_limit version\_compare .. ###### END~OF~TABLE ###### .. _Program-execution-Functions: Program execution Functions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ escapeshellarg .. _Regular-Expressions-Perl-Compatible: Regular Expressions (Perl-Compatible) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ preg\_grep preg\_quote sql\_regcase .. _Streams: Streams ^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _stream-context-create: stream\_context\_create """"""""""""""""""""""" .. container:: table-row a stream\_context\_create stream\_context\_get\_default stream\_context\_get\_options stream\_context\_get\_params stream\_context\_set\_default b stream\_context\_set\_option stream\_context\_set\_params stream\_get\_contents stream\_get\_line stream\_is\_local .. ###### END~OF~TABLE ###### .. _Strings: Strings ^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _addcslashes: addcslashes """"""""""" .. container:: table-row a addcslashes addslashes bin2hex chop chr chunk\_split convert\_cyr\_string convert\_uuencode count\_chars crc32 echo explode get\_html\_translation\_table html\_entity\_decode htmlentities htmlspecialchars htmlspecialchars\_decode implode join lcfirst levenshtein localeconv ltrim md5 md5\_file metaphone money\_format nl2br nl\_langinfo str\_shuffle str\_split b stripos stripslashes strcspn strip\_tags str\_word\_count strcasecmp strchr strcmp strcoll sscanf str\_getcsv str\_ireplace str\_pad str\_repeat str\_replace str\_rot13 rtrim setlocale sha1 sha1\_file similar\_text soundex split sprintf number\_format ord parse\_str printf quoted\_printable\_decode quoted\_printable\_encode quotemeta c stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk strpos strrchr strrev strripos strrpos strspn strstr strtok strtolower strtoupper strtr substr substr\_compare substr\_count substr\_replace trim ucfirst ucwords vprintf vsprintf wordwrap .. ###### END~OF~TABLE ###### .. _URLs: URLs ^^^^ .. ### BEGIN~OF~TABLE ### .. _base64-decode: base64\_decode """""""""""""" .. container:: table-row a base64\_decode base64\_encode get\_headers get\_meta\_tags http\_build\_query b parse\_url rawurldecode rawurlencode urldecode urlencode .. ###### END~OF~TABLE ###### .. _Variable-handling: Variable handling ^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _doubleval: doubleval """"""""" .. container:: table-row a doubleval empty floatval get\_defined\_vars get\_resource\_type gettype import\_request\_variables intval is\_array is\_binary is\_bool is\_buffer is\_callable is\_double is\_float is\_int is\_integer b is\_long is\_null is\_numeric is\_object is\_real is\_resource is\_scalar is\_string is\_unicode isset print\_r serialize settype strval unserialize var\_dump var\_export .. ###### END~OF~TABLE ###### .. _XML-Parser: XML Parser ^^^^^^^^^^ utf8\_decode utf8\_encode .. _i18n: i18n ^^^^ i18n\_loc\_get\_default i18n\_loc\_set\_default .. _runkit: runkit ^^^^^^ .. ### BEGIN~OF~TABLE ### .. _runkit-class-adopt: runkit\_class\_adopt """""""""""""""""""" .. container:: table-row a runkit\_class\_adopt runkit\_class\_emancipate runkit\_function\_add runkit\_function\_copy runkit\_function\_redefine runkit\_function\_remove runkit\_function\_rename b runkit\_import runkit\_method\_add runkit\_method\_copy runkit\_method\_redefine runkit\_method\_remove runkit\_method\_rename runkit\_superglobals .. ###### END~OF~TABLE ###### .. _xdiff: xdiff ^^^^^ xdiff\_string\_diff xdiff\_string\_patch .. _TODO: TODO ---- launch compilation from backend. |img-2| 15 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. |img-2| image:: img-2.png .. :border: 0 .. :height: 21 .. :hspace: 9 .. :id: Grafik2 .. :name: Grafik2 .. :width: 87