classes/phing/tasks/ext/zendguard/ZendGuardEncodeTask.php

\ZendGuardEncodeTask

Encodes files using Zeng Guard Encoder

This is very closely based on the ANT class of the same name.

Extends from
\MatchingTask
author
Petr Rybak
copyright
2001,2002 THYRELL. All rights reserved
package
phing.tasks.ext.zendguard
since
2.4.3
version
$Id: ZendGuardEncodeTask.php 1084 2011-05-06 09:55:25Z mrook $

Properties

Propertyprotectedbool  $aspTags= 'false'

Turn ASP tag (“<%” ) recognition on/off. (default: off). On or off must be specified as an argument when using this option.

The default, when this option is not used in the command-line, is - off

Default valuefalseDetails
Type
bool
Propertyprotectedbool  $deleteSource= 'true'

Permanently deletes (see warning below) the original source files specified in the SourceInputPath and saves the encoded files in its place.

This option has no option parameter. When this option is use, do not use the output_file parameter.

Warning: To avoid permanent loss of non-encoded scripts, make a backup. Deleted files cannot be restored or recovered and will be permanently deleted with this option. If you are unsure about deleting the source files, use the ––rename-source option instead

Default valuetrueDetails
Type
bool
Propertyprotected  $encodeCommand= ''
Details
Type
Propertyprotectedbool  $encodedOnly= 'false'

Force cooperation with other encoded files only. This option generates files that work exclusively with associated encoded files. Associated encoded files are those generated by the same company. Files that do not share the same encoded company association cannot call these files

Default valuefalseDetails
Type
bool
Propertyprotectedstring  $expires= 'null'

Make an encoded file to expire on the given date. Date is in yyyy-mm-dd format.

Default valuenullDetails
Type
string
Propertyprotected  $filesets= 'array'
Default valuearrayDetails
Type
Propertyprotectedbool  $forceEncode= 'false'

Allow encoding previously encoded files. (NOT recommended!)

Default valuefalseDetails
Type
bool
Propertyprotectedbool  $ignoreFileModes= 'false'

If true the ownership, permissions and timestamps of the encoded files won't be preserved.

Default valuefalseDetails
Type
bool
Propertyprotectedbool  $licenseProduct= 'false'

Enable licensing.

If enabled, productName must be defined.

Default valuefalseDetails
Type
bool
Propertyprotectedbool  $noHeader= 'false'

Disables the PHP-compatible header that is added to the top of every encoded file by default. Encoded files generated with this option will not display a meaningful error when loaded by PHP that doesn't have the Zend Optimizer properly installed.

Using this option saves approximately 1.5KB for every encoded file. Do not use it unless disk space constraints are critica

Default valuefalseDetails
Type
bool
Propertyprotectedint  $obfuscationLevel= '0'

Level of obfuscation. Defaults to 0 (no obfuscation).

Default value0Details
Type
int
Propertyprotectedint  $optMask= 'null'

Optimization mask. (default value: [+++++++]) opt_mask is an integer representing a bit-mask.

The default value enables all of the optimization passes. Each optimization pass of the Zend Optimizer can be turned on or off based on the mask entered

Default valuenullDetails
Type
int
Propertyprotectedstring  $privateKeyPath= 'null'

Path to private key for licensing

Default valuenullDetails
Type
string
Propertyprotectedstring  $productName= 'null'

Product name. Must be defined if licenseProduct or signProduct is set to 1

Default valuenullDetails
Type
string
Propertyprotectedstring  $prologFile= 'null'

Embed the information in the specified file into the header of the encoded file (overrides noHeader)

Default valuenullDetails
Type
string
Propertyprotectedstring  $renameSourceExt= 'null'

Move the original source file to <input_file>.<renameSourceExt> and save the encoded file in its place.

If specified deleteSource will be automatically disabled.

Default valuenullDetails
Type
string
Propertyprotectedbool  $shortTags= 'true'

Turns short PHP tag (“<?” ) recognition either on or off.

On or off must be specified as an argument when using this option. The default, when option is not used in the command-line, is - on

Default valuetrueDetails
Type
bool
Propertyprotectedbool  $signProduct= 'false'

Enable signing If enabled, productName must be defined.

Default valuefalseDetails
Type
bool
Propertyprotectedbool  $useCrypto= 'false'

If cryptography should be used to encode the source code

Default valuefalseDetails
Type
bool
Propertyprotectedstring  $zendEncoderPath= 'null'

Path to the zend encoder binary

Default valuenullDetails
Type
string

Methods

methodpublic  createFileSet( ) : \FileSet
Add a new fileset.
Returns
Type Description
\FileSet
methodprotected  encodeFile( string $filePath ) :
Encodes a file using currently defined Zend Guard settings
Parameters
Name Type Description
$filePath string Path to the encoded file
methodpublic  main( ) :
Do the work
Details
throws
methodprotected  prepareEncoderCommand( ) :
Prepares the main part of the command that will be used to encode the given file(s).
methodpublic  setAspTags(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setDeleteSource(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setEncodedOnly(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setExpires(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setForceEncode(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setIgnoreFileModes(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setLicenseProduct(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setNoHeader(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setObfuscationLevel(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setOptMask(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setPrivateKeyPath(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setProductName(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setPrologFile(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setRenameSourceExt(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setShortTags(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setSignProduct(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setUseCrypto(  $value ) :
Parameters
Name Type Description
$value
methodpublic  setZendEncoderPath(  $value ) :
TASK PROPERTIES SETTERS
Parameters
Name Type Description
$value
methodprotected  verifyConfiguration( ) :
Verifies that the configuration is correct
Details
throws

\ZendGuardFileSet

This is a FileSet with the to specify permissions.

Permissions are currently not implemented by PEAR Archive_Tar, but hopefully they will be in the future.

Extends from
\FileSet
author
Hans Lellelid (Phing)
author
Arnout J. Kuiper (Ant)
author
Stefano Mazzocchi (Ant)
author
Sam Ruby (Ant)
author
Jon S. Stevens (Ant)
author
Stefan Bodewig (Ant)
author
Magesh Umasankar (Ant)
package
phing.tasks.ext.zendguard
version
$Revision: 744 $ $Date: 2010-03-09 11:08:31 +0100 (Tue, 09 Mar 2010) $

Properties

Propertyprivate  $files= 'null'
Default valuenullDetails
Type

Methods

methodpublic  getFiles(  $p,  $includeEmpty = true ) :
Get a list of files and directories specified in the fileset.

@return array a list of file and directory names, relative to the baseDir for the project.

Parameters
Name Type Description
$p
$includeEmpty
Documentation was generated by DocBlox 0.13.1.