classes/phing/tasks/ext/zendguard/ZendGuardLicenseTask.php
protected function generateLicenseTemplateContent()
    {
        $contentArr = [];

        // Product Name
        $contentArr[] = ['Product-Name', $this->productName];
        // Registered to
        $contentArr[] = ['Registered-To', $this->registeredTo];
        // Hardware locked
        $contentArr[] = ['Hardware-Locked', ($this->hardwareLocked ? 'Yes' : 'No')];

        // Expires
        $contentArr[] = ['Expires', $this->expires];

        // IP-Range
        if (!empty($this->ipRange)) {
            $contentArr[] = ['IP-Range', $this->ipRange];
        }
        // Host-ID
        if (!empty($this->hostID)) {
            foreach (explode(';', $this->hostID) as $hostID) {
                $contentArr[] = ['Host-ID', $hostID];
            }
        } else {
            $contentArr[] = ['Host-ID', 'Not-Locked'];
        }

        // parse user defined fields
        if (!empty($this->userDefinedValues)) {
            $this->parseAndAddUserDefinedValues($this->userDefinedValues, $contentArr);
        }
        // parse user defined x-fields
        if (!empty($this->xUserDefinedValues)) {
            $this->parseAndAddUserDefinedValues($this->xUserDefinedValues, $contentArr, 'X-');
        }

        // merge all the values
        $content = '';
        foreach ($contentArr as $valuePair) {
            list($key, $value) = $valuePair;

            $content .= $key . " = " . $value . "\n";
        }

        return $content;
    }
protected function generateLicenseTemplateContent()
    {
        $contentArr = [];

        // Product Name
        $contentArr[] = ['Product-Name', $this->productName];
        // Registered to
        $contentArr[] = ['Registered-To', $this->registeredTo];
        // Hardware locked
        $contentArr[] = ['Hardware-Locked', ($this->hardwareLocked ? 'Yes' : 'No')];

        // Expires
        $contentArr[] = ['Expires', $this->expires];

        // IP-Range
        if (!empty($this->ipRange)) {
            $contentArr[] = ['IP-Range', $this->ipRange];
        }
        // Host-ID
        if (!empty($this->hostID)) {
            foreach (explode(';', $this->hostID) as $hostID) {
                $contentArr[] = ['Host-ID', $hostID];
            }
        } else {
            $contentArr[] = ['Host-ID', 'Not-Locked'];
        }

        // parse user defined fields
        if (!empty($this->userDefinedValues)) {
            $this->parseAndAddUserDefinedValues($this->userDefinedValues, $contentArr);
        }
        // parse user defined x-fields
        if (!empty($this->xUserDefinedValues)) {
            $this->parseAndAddUserDefinedValues($this->xUserDefinedValues, $contentArr, 'X-');
        }

        // merge all the values
        $content = '';
        foreach ($contentArr as $valuePair) {
            list($key, $value) = $valuePair;

            $content .= $key . " = " . $value . "\n";
        }

        return $content;
    }
protected function generateLicenseTemplateContent ( ) { $ contentArr = [ ] ; // Product Name $ contentArr [ ] = [ 'Product-Name' , $ this -> productName ] ; // Registered to $ contentArr [ ] = [ 'Registered-To' , $ this -> registeredTo ] ; // Hardware locked $ contentArr [ ] = [ 'Hardware-Locked' , ( $ this -> hardwareLocked ? 'Yes' : 'No' ) ] ; // Expires $ contentArr [ ] = [ 'Expires' , $ this -> expires ] ; // IP-Range if ( ! empty ( $ this -> ipRange ) ) { $ contentArr [ ] = [ 'IP-Range' , $ this -> ipRange ] ; } // Host-ID if ( ! empty ( $ this -> hostID ) ) { foreach ( explode ( ';' , $ this -> hostID ) as $ hostID ) { $ contentArr [ ] = [ 'Host-ID' , $ hostID ] ; } } else { $ contentArr [ ] = [ 'Host-ID' , 'Not-Locked' ] ; } // parse user defined fields if ( ! empty ( $ this -> userDefinedValues ) ) { $ this -> parseAndAddUserDefinedValues ( $ this -> userDefinedValues , $ contentArr ) ; } // parse user defined x-fields if ( ! empty ( $ this -> xUserDefinedValues ) ) { $ this -> parseAndAddUserDefinedValues ( $ this -> xUserDefinedValues , $ contentArr , 'X-' ) ; } // merge all the values $ content = '' ; foreach ( $ contentArr as $ valuePair ) { list ( $ key , $ value ) = $ valuePair ; $ content .= $ key . " = " . $ value . "\n" ; } return $ content ; }
Generates license template content based
on the defined parameters

@return string
Generates license template content based on the defined parameters