Fat-Free Framework 1.4.1 Quick Reference spam. This plug-in requires a key from akismet.com. from key a requires plug-in This spam. Axon instanceAxon representing the SQL record if succes password Returns field. FALSE if authenticationfai databaseidentifier, table: table SQL name, id:use AUTHmapper.Axon should contain the elemfollowing Authenticateuser credentials against SQL a databas sqldb( instance theM2 representing the object NoSQL su if field, password pw: field. Returns if FALSE authenti db: databaseidentifier, collection: collectionnam mapper. theM2 AUTH should contain the el following Authenticateuser credentials against ser MongoDB a nosqldb( domaincontroller, rdn: connectionpw: DN, connecti AUTH server. should contain the following elements Authenticateuser credentials against an LDAP/Active ldap( hostIMAPserver, nameof TCP port: port. shouldcontain the elementsfollowing server: IP - Authenticateuser credentials against serve an IMAP imap( or sqldb, imap, nosqldb). HTTP authentication Basic using the specified metho methods. basic( authentication user various for plug-in A Auth ifTRUE authentication succeeds. checking.spam validA requiredis key to use the A approval Secure from akismet.com to use the public verify( contentReport that not was marked as spam. spam( contentReport as a positive. false ham( Returnsthe if TRUE contentdeterminedis as spam. valida Submit content(usually blog a comment)to akismet. input during check( use can you that wrapper API An Akismet framework variable (array) must be set up prior to to prior up set be must (array) variable framework determine if a blog comment, trackback, or pingback or trackback, comment, blog a if determine these methods. methods. these string string string string string string string string string string string string string string string string string string text, text, user_id, user_id, user_id, user_id, method, [ [ method, text, text, user_id, user_id, text, text, key ); key user_id, user_id, string string string string string string string string string string string string author, author, string string author, author, string string author, author, password ); password password ); password password ); password realm ] );realm ] password ); password string string string string string string email, email, email, email, email, email, string string string string string string url ); url e,id:user ID url ); url url ); url r ID ID r field, pw: address or use of any of of any of use The AUTH AUTH The ls,orthe PI. Returns PI. cation fails, orfails, cation on password. tion to to tion

r.AUTH - dc: dc: - ccessful. API for com. e using e the sful. contains contains d (ldap, d ements- ver using ver Directory ents db: - filter types. filter arguments.See the PHPfilter_var() mo functionfor filters,filter flags, andoptions may passedas be the argument If function: and value name.field and HTML PHPtagsa HTML tagsin allHTML string elements scrubbed. be will route()Thismethod. command passesargumentstwo t ordaisy-chainedsingle a string of functionsnamed specifiedstring. hex ReturnifTRUE SESSION.captcha is set andidentical t validCaptcha( validCaptcha( attacks. all Remove HTML tagsto protect againstXSS/SQL inj scrub( manipulation. Assign validators. and input( handlers data Input Data ReturnifTRUE urlvalid,is FALSE otherwise. validURL( validEmail( ReturnifTRUE e-mail address valid,is otherwi FALSE [ [ array string string mixed mixed options ] ); options] handler tags string string

string string fields, fields, , if specified, , be will preserved.If value, [ value, string string handler url ); url to HTML form validation fieldsfor and tags tags address ); address

mixed mixed hex ); hex is notis specified. PHP validation/sanitize string string may be an may be anonymous orfunction, named handler, [ handler,

tags ] ] );tags

string string tags ],[ ],[ tags value value additional integer integer

reondetails similar to thesimilar is anis array, re strippedre se. se. othe ection o filter ], ], filter handler

Fat-Free Framework 1.4.1 Quick Reference transpose( transpose( slug( sitemap( sign( send( pick( minify( isAjax( http( hexbin( Testconditionand append result to the framework's expect( framework’s the extend that binhex( tools of hodge-podge A Expansion Retrieve the specified Retrieve variable. variable. thirdargument presentis (default TRUE).is per kilobytes second specified.is partialSupport Transmitto HTTP file client.Limit usage bandwidth features. features. numberpositive.is the Returnsspecified if -1 number negative,is0 i is TRUE (default).TRUE is optionalis URI query string. Respect HTTP 30x redi usingstandarda TCPport(80 for 443 HTTP, HTT for patternURI. should include portnumber after host HEAD/POST/PUT/DELETE spacecommand,a andan absolute andreturn host’s response. pattern consists an of HTTP/S requestSend to another host; forward headers ReturnifTRUE HTTP request origin AJAX.is Generate XML sitemapGenerate XML starting atspecified url. Converthexadecimal to binary-packed data. Convertbinary-packed datato hexadecimal. [ [ string. Resultstring. truncatedis if max_length character Returns1738-compliant an RFC URL-friendly version second if argument TRUEis (default). becomecolumns, and versa. vice Contentvariable of Rotatetwo-dimensionala framework array variable, comments, then comments, send as a single of orblock CSS Jav Compressspecified removingby files all whitespace boolean boolean string string string string mixed string string string string void void string string string string string mixed mixed

follow ] ); ] follow string string variable, variable, text, [ [ text, ); number pattern, [ [ pattern, string string file, [ file, ); path,

hex_data binary_data condition, condition, root_url ); root_url variable, variable, string string integer integer array array

mixed mixed

column string string

); kbps ], [ [ ], kbps filenames ); filenames string string

max_length ] ); ] max_length

boolean boolean ); column column ); content ], [ [ ], content

of a of array framework true, true, boolean boolean replace ); replace

string string

string string partial ] ); ] partial false ); false

headers ], headers

f zero, f or if the 1 downloadsif s present.is HTTPGET/ , if speed , in name if not name if rectsif follow variable

PS).content TEST sorows sand is replacedis ascript. of specified of basic basic received

. language translator, Web search, Google Maps and At and Maps Google search, Web translator, language is TRUE (default),TRUE is XML string returned,is otherwise Atom/RSS Retrieve feedusing Google AJAX FeedAPI. I languageGoogle translator. validISO be alpha-2 639-1 language codes supported Translateone from text language toanother.a from search hits.search indexedpage). Result anis array maximuma with of PerformGooglea onsearch specified text (starting feeds. feeds. Instantiateand logger create file. Returncountriesarray of indexed 2-letterby count A nice collection of Google AJAX API adaptors for G for adaptors API feed( AJAX Google of collection nice A Google weather( timezones( tables. countries( reference World-related Geo Send text text Send datato logger. write( logger. Log( new custom simple A Log translate( search( apis/maps/documentation/staticmaps/#Markers details for attospecified the image locations (see http://code. (en map default). markers define oneormarkermore and default), language usedis for theof display l (roadmapdefault). should format png, jpegor be gi shouldtheseone of be roadmap, values: satellite, rectangularsize defines dimensions400is(default zoom73.998672'. determinesmagnification level(de comma-separateda latitude-longitude e.g. pair, '40 the of center (a string map address, e.g. 'cityhal Generatemapstatic a using Google API. Maps center [ ], type map( usage. usage. countrylatitude, code, longitude, anddaylight-sav zonedefinedis as an array containingUTCoffset, Returnzoneinfo array indexed by time Unix zone. Eac location definedlocation latitudeby and longitude. Returnancurrent array of weatherconditions ata string string string string string float string string center, [ [ center, void url, [ [ url, void text );text text, [ [ text, latitude, latitude, ); format ], [ ], format filename ); filename ); text, text,

boolean

integer integer string float is_xml ]is_xml );

from, from, string [ zoom ], page ] ); ] page longitude ); longitude language ], [ ], language string

string to );to

size ], [ ], size

array l, new york,l, ny' or abelson the ing time ing (dst) specific orhybrid rycode. 2-letter f (png f atzero- , a , PHParray. .714728, .714728, - markers ] ); ] markers x400).type google.com/ oogle's oogle's ndto must eight (8) fault is 15).is fault string string sto attach defines the theby htime om/RSS om/RSS fis_xml ). ).

Fat-Free Framework 1.4.1 Quick Reference pixels. Generate icon hex-string a from hashDefault value. integer traceroute( spam( realIP( privateIP( extension). sockets PHP (requires ping( utilities Network Network thumb( invert( identicon( Generateblanka image for use as placeholder.a fakeimage( extension GD PHP’s on );font ] dependent width, integer captcha( generators Graphics Graphics wait ); wait ICMP echo ICMP request and 30hops. specifiednetwork destination.. Default time wait i Returnsan array representing the pathbytaken pac settingspackets: - 3 andwait time: 3 seconds. IPResolves address to host dnsresolve nameif T is numberof packetsreceived, ifor FALSE host notis min, containing: avg, andmax round-trip time (mill ICMP Send echo requests to specified address; Retur Returns addressif TRUE IPv4 listedis inspam datab (proportions) as original. height. maximum Resulting image has the sameaspect Generatethumbnail image of specified maximum width address. headersSniff addressreal for IP and returns the d Invert colors of colors Invert specified JPG/GIF/PNG image. Returns address if TRUE IP localis orwithina priv ['captcha'] andthe ['captcha'] frameworkvariableSESSION['cap of equivalent the CAPTCHA image storedis in$_SESSI The generate. default TrueType font Th cube.ttf. is lengthpixels). represents the hex number of charac GenerateCAPTCHA image of specified andheigh width string hops );hops

string void string string string string

string string string ); address, address, address ); address integer integer string filename ); filename

filename, filename,

address ); address hash, [ [ hash, address, address, width, width, boolean

integer integer

integer integer integer integer integer integer

boolean dnsresolve, dnsresolve, width, size ] ); ] size height, height, height, height, dnsresolve, dnsresolve, integer integer integer integer

integer integer integer height );height length, [ [ length, integer bgcolor ); ); bgcolor packets, packets, s3 seconds per ate range. IPv4 e string e etected etected IPv4 iseconds),and

RUE.Default tersto size is 64 kets tokets a reachable. ase.

wait, wait, tcha']. nsan array string string ON ratio . . and t(in integer

timer has timer not expired). Default associatedwith the SQL statement retrievedis from transaction.If are androllback dependent on the successful comple treatedisas single a SQL transaction inwhich - c Getinformation about specified user_id. Retrieve Retrieve informationabout user’sa friends. datatype. Returnsclass PDO constant corresponding to the arg type( PDOanda class datatype. array escapingrules for variousdatatypes.. Valuesint the underlying allowing database to apply thdriver (representedas key-value in pairs argumentthe 2nd placeholdersinthe SQL statement to corresponding Similarto the () method but allows bindinglate ); ] timeout sqlbind( databases. SQL for wrapper sql( API stand-alone A SQLdb show( show( search( s followers( matching tweets for friends( Search wrapper. API Twitter A Twitter Retrieve Retrieve informationabout user’sa followers. get information about a user, friends and followers and friends user, a about information get Execute Execute SQL Returnsmaximuma of tweets. 10 mustlanguage be validISO 639-1 alpha-2 language c type default). should be mixed, recent,or popular since (default). follows YYYY-MM-DD(current format all tweetsFind that match specified text. page ind type ], [ [ ], type mixed mixed kv_pairs mixed mixed string string string string string string statement, [ statement, string user_id ); user_id value ); value text, [ [ text, user_id ); user_id statement timeout statement, statement, language ] ); ] language may be strings maybe or an array aconsisting of value user_id ); user_id integer

is specified,is previously-generated output

. If an array. of string string array array

page ], [ [ ], page

db ], [ db db db kv_pairs, [ [ kv_pairs, identifier'DB'.is integer integer statements string string string since ], [ ], since timeout ] ); ] timeout db ], [ db heassociative ase, commit of parameters/ exstarts at1 (mixeddefault). is specified,is it e appropriate e . . pecified text, text, pecified cache(if ), thereby ), date values ode. ument's tionof the string integer integer

Fat-Free Framework 1.4.1 Quick Reference set( set( get( specified Delete filefrom ZIP archive. ar ZIP clear( handling for Create/openZIParchive.a class utility Zip( new general-purpose A Zip ofNotifyYahoo! changesto the pageWeb topointed ping( ReturnifTRUE specified userYahoo! online.is ID online( services. Web Yahoo! inlinks( for wrapper API Yahoo Returncontentspecified of filefrom ZIParchive. domain/subdomainshould be omitted. or'subdomain' determines whether- from links the set(starting omitmay at1). an be emptystring (d maximum per query).start usedis pagination for wi containingmaximum count(default links 100, also t Thismethod returns if FALSE an erroroccurred ora appid(applicationYahoo! andID) path(query URL) Retrieve about info inbound links toparticulara W start ], [ [ ], start folder folder if contentorNULL is unspecified. orreplace Add filein ZIParchive using specified string string string string string string string path, [ [ path, path); boolean url ); ); url path); id ); id appid, appid, file ); file omit ] ); ] omit

string string content ] ); content] path, [ [ path,

integer

count ], [ [ ], count efault),'domain' content.Create

chives. chives. eb page. eb are required.are thinthe result narray integer same he theby url.

Fat-Free Framework 1.4.1 Quick Reference An easy-to-use object-relational mapper for represe for mapper object-relational easy-to-use An comma-separatedlist of fieldsspecified in order order Resultsortedis according to the sequence of field If If is an alias of this anisof alias method. Insertorupdaterecord based on contentsAxon of p save( DehydratesoAxon instantiation Axon new of notis reset( specific over Similarto Axon methodfind() but provides fine-gra ], [ order lookup( Retrieve record first that satisfies load( Returnsspecified if TRUE virtual exists,field FALS isdef( Returnsrecords number of that match specified found( Returnstherecord first that matches the specified [ findone( Returnsandatabase arrayrecords of speci matching ); ] timeout [ find( record Delete andreset Axon. erase( ReturnsAxon if TRUE devoidis of initsvalues prop dry( Create virtual a andassignfield SQL def( replication record to specified have which names will identicalto fieldsin the re Populate array framework variableAxonwith propert copyto( of keys which mustidentical tobe namesfield int HydratewithAxon elements fromarray framework var copyfrom( necessary.Default timeout cache is seconds 60 (see SYNC Ad variable). InstantiateobjectAxon andmap to specified Axon( new Axon ORM the relative therelative [ [ queries. queries. criteria integer integer void string string string string andshort-listed by void string string void void string string string string string string string string timeout ] ); ] timeout

is omittedisor NULL, all recordsintable returnare );

criteria, [ criteria, string string name, name,

);

string string string string ); ); offset. string string

name );name criteria] ); criteria] criteria ], [ criteria fields fields fields, [ fields, name, [ [ name, limit ], [ limit name ); ); name criteria ], [ criteria string string table, [ [ table,

and db string string

identifier is 'DB'. string string string string expression ); expression grouping grouping order ], [ order limit string string string string integer integer fields ); ] criteria ], [ ], criteria string string . fields order ], [ ], order db );db ] timeout ] ); ] timeout of results. Theof select() method criteria integer order ], [ order ,if present. expression offset);] string string ,sort according to string string order string string table grouping ], [ [ grouping], limit ], [ ], limit ,andstarting at for use for in criteria

cord. Limitcord. limit ], limit herecord. sspecified in

E otherwise.E .Default criteria ined ined control erties. nting SQL data as objects. Depends on the SQLdb plu SQLdb the on Depends objects. as data SQL nting roperties. necessary. fied ies, of keys just if justif iable, . integer integer criteria . ed. string string . . beforeload( beforeload( Invokedbefore/after syncAxon methodexecuted.is beforesync( Event Listeners Destroythe specified virtual field. undef( SynchronizeAxon new and sync( offset thefollowing same criteriaused to hydrate the Axo the record Retrieve atthe offset relative to curr [ skip( Invokedbefore/after eraseAxon methodexecuted.is beforeerase( Invokedbefore/after saveAxon methodexecuted.is beforesave( Invokedbefore/after loadAxon methodexecuted.is Triggers errorTriggersif skipping beyond boundshydrati of instantiatingAxon. new Default seconds(see SYNC variable). Called automatically w moves forward,negative backward. re-syncs Zero Ax string string string string integer integer table, [ [ table, void void void name ); name void offset ] ); ] offset

); afterload( );afterload( ); aftersync( ); ); aftersave( aftersave( );

); aftererase( );aftererase( string string db ] );db table void void void db void

structure.timeout Default is 60

); ); ); ); ); ); identifier'DB'.is

g-in. g-in. ); entposition oncriteria. n. n. Positive hen

on. Fat-Free Framework 1.4.1 Quick Reference Fat-Free’s data mapper for MongoDB objects. objects. MongoDB for mapper data Fat-Free’s comma-separatedlist of fieldsspecified in skip( [ [ skip( save( DehydrateM2so instantiation of M2unnecessis new reset( fieldsspecificand map-reduction results. of Similarto M2find method but provides fine-grained ], [ order lookup( Retrieve object first that satisfies load( found( [ findone( [ ], offset [ find( record Delete andreset M2. erase( Returns if TRUE M2 devoidis of values inits proper dry( replication record to specified have which names will identicalto fieldsin the re Populate array framework variableM2withpropertie copyto( copyfrom( Instantiateobject and M2 to map specifiedcollecti M2( new MongoDB M2: Mapper the relative therelative [ [ properties. Insertorupdatecollection object on based content of which of must be identicalto field names inthe co HydrateM2elementswith from framework array varia criteria. Returns number of collectionobjects that spe match criteria. Triggers M2. errorif skipping beyond bounds hyd of offset Positive moves negative forward, backward. Z collectionfollowing the same criteriaused to hydr the object Retrieve atthe offset relative to curre specifiedandinorder short-listed limit.Defauby returned.Result sortedis according to the sequenc If criteria omittedisorNULL, objects all in the Returnsancollection array objects of matching spe criteria. Returnsthecollection objectfirst that matchesth identifier'DB'.is integer integer void array array void void void array array array array integer integer string string array array offset ], [ [ ], offset

); string string

string string

); criteria, [ [ criteria, string string array array integer integer ); ); offset

criteria] ); criteria] criteria ], [ ], criteria fields, [ [ fields, name, [ [ name, offset ] ); ] offset collection, [ [ collection, limit ], [ limit ], [ criteria name ); name . . timeout ] ); ] timeout integer integer array array array array string string

array array integer integer order ], [ order timeout ] ); ] timeout criteria ], [ [ ], criteria string string fields ); ] array array order ], [ ], order

fields offset ], [ ], offset order ], [ order db ] ); ] db criteria ,if present. integer integer

array array integer integer ,sort according to offset ] ); ] offset integer integer order integer integer ], [ ], mapreduce collectionare limit ], [ [ ], limit ntposition inthe ,andstarting at lt offsetlt zero.is cord. Limitcord. e specified e timeout ] ); ); ] timeout ate M2. ateM2. limit ], ], limit llection. on.Default s of sof M2 e of fields ties. cified cified criteria. controlover ration erore-syncs cified cified s,ofkeys ary. ble, keys integer integer array array db db Invokedbefore/after M2erase method executed.is beforeerase( Invokedbefore/after M2 save method executed. is beforesave( beforeload( Invokedbefore/after M2sync method executed. is beforesync( Event Listeners sync( SynchronizeM2and new instantiatingDefault M2. new Invokedbefore/after M2 load methodexecuted.is string string collection, [ [ collection, void void void void

); afterload( );afterload( ); aftersync( ); ); aftersave( aftersave( );

); aftererase( );aftererase( string string collection db ] );db void db void void void identifier 'DB'.is

); ); ); ); ); . Called Called . automaticallywhen

);