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

## \ZendGuardEncodeTask
jump to top

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

`bool $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 value `false` Details

Type
  bool

`bool $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 value `true` Details

Type
  bool

`$encodeCommand= ''`
Details

Type

`bool $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 value `false` Details

Type
  bool

`string $expires= 'null'`

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

Default value `null` Details

Type
  string

`$filesets= 'array'`
Default value `array` Details

Type

`bool $forceEncode= 'false'`

Allow encoding previously encoded files. (NOT recommended!)

Default value `false` Details

Type
  bool

`bool $ignoreFileModes= 'false'`

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

Default value `false` Details

Type
  bool

`bool $licenseProduct= 'false'`

Enable licensing.

If enabled, productName must be defined.

Default value `false` Details

Type
  bool

`bool $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 value `false` Details

Type
  bool

`int $obfuscationLevel= '0'`

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

Default value `0` Details

Type
  int

`int $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 value `null` Details

Type
  int

`string $privateKeyPath= 'null'`

Path to private key for licensing

Default value `null` Details

Type
  string

`string $productName= 'null'`

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

Default value `null` Details

Type
  string

`string $prologFile= 'null'`

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

Default value `null` Details

Type
  string

`string $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 value `null` Details

Type
  string

`bool $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 value `true` Details

Type
  bool

`bool $signProduct= 'false'`

Enable signing If enabled, productName must be defined.

Default value `false` Details

Type
  bool

`bool $useCrypto= 'false'`

If cryptography should be used to encode the source code

Default value `false` Details

Type
  bool

`string $zendEncoderPath= 'null'`

Path to the zend encoder binary

Default value `null` Details

Type
  string

### Methods

`createFileSet( ) : \FileSet`
Add a new fileset.
Returns

Type | Description
--- | ---
\FileSet |

`encodeFile( string $filePath ) :`
Encodes a file using currently defined Zend Guard settings
Parameters

Name | Type | Description
--- | --- | ---
$filePath | string | Path to the encoded file

`main( ) :`
Do the work
Details

throws

`prepareEncoderCommand( ) :`
Prepares the main part of the command that will be used to encode the given file(s).
`setAspTags( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setDeleteSource( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setEncodedOnly( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setExpires( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setForceEncode( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setIgnoreFileModes( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setLicenseProduct( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setNoHeader( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setObfuscationLevel( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setOptMask( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setPrivateKeyPath( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setProductName( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setPrologFile( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setRenameSourceExt( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setShortTags( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setSignProduct( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setUseCrypto( $value ) :`
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`setZendEncoderPath( $value ) :`
TASK PROPERTIES SETTERS
Parameters

Name | Type | Description
--- | --- | ---
$value |  |

`verifyConfiguration( ) :`
Verifies that the configuration is correct
Details

throws

## \ZendGuardFileSet
jump to top

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 <hans@xmpl.org> (Phing)
author
  Arnout J. Kuiper <ajkuiper@wxs.nl> (Ant)
author
  Stefano Mazzocchi <stefano@apache.org> (Ant)
author
  Sam Ruby <rubys@us.ibm.com> (Ant)
author
  Jon S. Stevens <jon@clearink.com> (Ant)
author
  Stefan Bodewig <stefan.bodewig@epost.de> (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

`$files= 'null'`
Default value `null` Details

Type

### Methods

`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.