# Class WebClientPrint

WebClientPrint provides functions for registering the "WebClientPrint for PHP" solution script code in PHP web pages as well as for processing client requests and managing the internal cache.

Namespace: Neodynamic\SDK\Web
Copyright: (c) 2013, Neodynamic SRL
License: Neodynamic EULA
Author: Neodynamic <http://neodynamic.com/support>
Located at WebClientPrint.php

Methods summary
`public static` | # `cacheAdd( string $sid, string $key, string $val )` Adds a new entry to the built-in file system cache. Adds a new entry to the built-in file system cache. #### Parameters $sid `string` $sid The user's session id $key `string` $key The cache entry key $val `string` $val The data value to put in the cache #### Throws ``Exception``
`public static string` | # `cacheGet( string $sid, string $key )` Gets a value from the built-in file system cache based on the specified sid & key Gets a value from the built-in file system cache based on the specified sid & key #### Parameters $sid `string` $sid The user's session id $key `string` $key The cache entry key #### Returns `string` Returns the value from the cache for the specified sid & key if it's found; or an empty string otherwise. #### Throws ``Exception``
`public static` | # `cacheClean( type $minutes )` Cleans the built-in file system cache Cleans the built-in file system cache #### Parameters $minutes `type` $minutes The number of minutes after any files on the cache will be removed.
`public static string` | # `createWcppDetectionScript( )` Returns script code for detecting whether WCPP is installed at the client machine. Returns script code for detecting whether WCPP is installed at the client machine. The WCPP-detection script code ends with a 'success' or 'failure' status. You can handle both situation by creating two javascript functions which names must be wcppDetectOnSuccess() and wcppDetectOnFailure(). These two functions will be automatically invoked by the WCPP-detection script code. The WCPP-detection script uses a delay time variable which by default is 10000 ms (10 sec). You can change it by creating a javascript global variable which name must be wcppPingDelay_ms. For example, to use 5 sec instead of 10, you should add this to your script: var wcppPingDelay_ms = 5000; #### Returns `string` A [script] tag linking to the WCPP-detection script code. #### Throws ``Exception``
`public static string` | # `getWcppDetectionMetaTag( )` Returns a string containing a HTML meta tag for the WCPP-detection procedure. Returns a string containing a HTML meta tag for the WCPP-detection procedure. The meta tag X-UA-Compatible is generated for Internet Explorer (IE) 10 or greater to emulate IE9. If this meta tag is not generated, then IE10 or greater will display some unwanted dialog box to the user when the WCPP-detection script is executed. #### Returns `string` A string containing a HTML meta tag for the WCPP-detection procedure.
`public static string` | # `createScript( string $clientPrintJobUrl )` Returns a [script] tag linking to the WebClientPrint script code by using the specified URL for the client print job generation. Returns a [script] tag linking to the WebClientPrint script code by using the specified URL for the client print job generation. #### Parameters $clientPrintJobUrl `string` $clientPrintJobUrl The URL to the php file that creates ClientPrintJob objects. #### Returns `string` A [script] tag linking to the WebClientPrint script code by using the specified URL for the client print job generation. #### Throws ``Exception``
`public static` | # `processRequest( mixed $data )`

Constants summary
`string` | `VERSION` | `'2.0.0.0'` | #
`string` | `CLIENT_PRINT_JOB` | `"clientPrint"` | #
`string` | `WCP` | `'WEB_CLIENT_PRINT'` | #
`string` | `WCP_CACHE_WCPP_INSTALLED` | `'WCPP_INSTALLED'` | #
`string` | `WCP_CACHE_WCPP_VER` | `'WCPP_VER'` | #
`string` | `WCP_CACHE_PRINTERS` | `'PRINTERS'` | #

Properties summary
`public static string` | $licenseOwner | `''` | # Gets or sets the License Owner Gets or sets the License Owner
`public static string` | $licenseKey | `''` | # Gets or sets the License Key Gets or sets the License Key
`public static string` | $webClientPrintAbsoluteUrl | `''` | # Gets or sets the ABSOLUTE URL to WebClientPrint.php file Gets or sets the ABSOLUTE URL to WebClientPrint.php file
`public static string` | $wcpCacheFolder | `''` | # Gets or sets the wcpcache folder URL RELATIVE to WebClientPrint.php file. FILE WRITE permission on this folder is required!!! Gets or sets the wcpcache folder URL RELATIVE to WebClientPrint.php file. FILE WRITE permission on this folder is required!!!