# tasks/ext/zendguard/ZendGuardEncodeTask.php

## \ZendGuardEncodeTask
jump to top

Package: phing\tasks\ext\zendguard

Encodes files using Zeng Guard Encoder

Parent(s)
  \MatchingTask < \Task < \ProjectComponent
Author
  Petr Rybak
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
  n/a

`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
  n/a

`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

`__construct( ) : void`

`appendSelector( ) : void`

`createAnd( ) : void`

`createContains( ) : void`

`createCustom( ) : void`

`createDate( ) : void`

`createDepend( ) : void`

`createDepth( ) : void`

`createExclude( ) : void`

`createExcludesFile( ) : void`

`createFileSet( ) : \FileSet`

Add a new fileset.

Returns

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

`createFilename( ) : void`

`createInclude( ) : void`

`createIncludesFile( ) : void`

`createMajority( ) : void`

`createNone( ) : void`

`createNot( ) : void`

`createOr( ) : void`

`createPatternSet( ) : void`

`createPresent( ) : void`

`createSelector( ) : void`

`createSize( ) : void`

`encodeFile( string $filePath ) : void`

Encodes a file using currently defined Zend Guard settings

Parameters

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

`getDescription( ) : void`

`getDirectoryScanner( ) : void`

`getImplicitFileSet( ) : void`
final

`getLocation( ) : void`

`getOwningTarget( ) : void`

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getSelectors( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`hasSelectors( ) : void`

`init( ) : void`

`log( ) : void`

`main( ) : void`

Do the work

Throws

Exception | Description
--- | ---
\BuildException |

`maybeConfigure( ) : void`

`perform( ) : void`

`prepareEncoderCommand( ) : void`

Prepares the main part of the command that will be used to encode the given file(s).

`selectorCount( ) : void`

`selectorElements( ) : void`

`setAspTags( $value ) : void`

Parameters

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

`setCaseSensitive( ) : void`

`setDefaultexcludes( ) : void`

`setDeleteSource( $value ) : void`

Parameters

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

`setDescription( ) : void`

`setEncodedOnly( $value ) : void`

Parameters

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

`setExcludes( ) : void`

`setExcludesfile( ) : void`

`setExpires( $value ) : void`

Parameters

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

`setFollowSymlinks( ) : void`

`setForceEncode( $value ) : void`

Parameters

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

`setIgnoreFileModes( $value ) : void`

Parameters

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

`setIncludes( ) : void`

`setIncludesfile( ) : void`

`setLicenseProduct( $value ) : void`

Parameters

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

`setLocation( ) : void`

`setNoHeader( $value ) : void`

Parameters

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

`setObfuscationLevel( $value ) : void`

Parameters

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

`setOptMask( $value ) : void`

Parameters

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

`setOwningTarget( ) : void`

`setPrivateKeyPath( $value ) : void`

Parameters

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

`setProductName( $value ) : void`

Parameters

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

`setProject( ) : void`

`setPrologFile( $value ) : void`

Parameters

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

`setRenameSourceExt( $value ) : void`

Parameters

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

`setRuntimeConfigurableWrapper( ) : void`

`setShortTags( $value ) : void`

Parameters

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

`setSignProduct( $value ) : void`

Parameters

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

`setTaskName( ) : void`

`setTaskType( ) : void`

`setUseCrypto( $value ) : void`

Parameters

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

`setZendEncoderPath( $value ) : void`

TASK PROPERTIES SETTERS

Parameters

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

`verifyConfiguration( ) : void`

Verifies that the configuration is correct

Throws

Exception | Description
--- | ---
\BuildException |

## \ZendGuardFileSet
jump to top

Package: phing\tasks\ext\zendguard

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.

Parent(s)
  \FileSet < \AbstractFileSet < \DataType < \ProjectComponent

### Properties

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

Type
  n/a

### Methods

`__clone( ) : void`

`__construct( ) : void`

`appendSelector( ) : void`

`circularReference( ) : void`

`createAnd( ) : void`

`createContains( ) : void`

`createContainsRegexp( ) : void`

`createCustom( ) : void`

`createDate( ) : void`

`createDepend( ) : void`

`createDepth( ) : void`

`createExclude( ) : void`

`createExcludesFile( ) : void`

`createFilename( ) : void`

`createInclude( ) : void`

`createIncludesFile( ) : void`

`createMajority( ) : void`

`createNone( ) : void`

`createNot( ) : void`

`createOr( ) : void`

`createPatternSet( ) : void`

`createPresent( ) : void`

`createSelector( ) : void`

`createSize( ) : void`

`createType( ) : void`

`dieOnCircularReference( ) : void`

`getCheckedRef( ) : void`

`getDescription( ) : void`

`getDir( ) : void`

`getDirectoryScanner( ) : void`

`getFiles( $p, $includeEmpty = true ) : void`

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

`getProject( ) : void`

`getRef( ) : void`

`getSelectors( ) : void`

`hasPatterns( ) : void`

`hasSelectors( ) : void`

`isReference( ) : void`

`log( ) : void`

`noChildrenAllowed( ) : void`

`parsingComplete( ) : void`

`selectorCount( ) : void`

`selectorElements( ) : void`

`setCaseSensitive( ) : void`

`setDefaultexcludes( ) : void`

`setDescription( ) : void`

`setDir( ) : void`

`setExcludes( ) : void`

`setExcludesfile( ) : void`

`setExpandSymbolicLinks( ) : void`

`setIncludes( ) : void`

`setIncludesfile( ) : void`

`setProject( ) : void`

`setRefid( ) : void`

`setupDirectoryScanner( ) : void`

`tooManyAttributes( ) : void`

Documentation was generated by DocBlox 0.17.1.