Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Nov 21, 2023 via composer

phpunit/php-text-template 3.0.1

Simple template engine.
Package summary
Share
0
issues
1
license
1
BSD-3-Clause
Package created
18 Sep 2012
Version published
31 Aug 2023
Maintainers
1
Total deps
1
Direct deps
0
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
phpunit/php-text-template@3.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
ā“˜ This is a list of phpunit/php-text-template 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does phpunit/php-text-template do?

The phpunit/php-text-template is a simple template engine package that is utilized in PHP development. This powerful yet concise library allows developers to generate and manipulate text-based contents dynamically using custom-defined templates, offering flexibility and reducing repetitive code writing.

How do you use phpunit/php-text-template?

Utilizing the phpunit/php-text-template in your PHP projects is relatively straightforward. First, you need to install the package to your project. You can achieve this by using Composer, the PHP package manager. For general use, run the composer installation command composer require phpunit/php-text-template. If you only require the library during the development phase, for instance, to run your project's test suite, you should add it as a development-time dependency by using the composer require --dev phpunit/php-text-template command.

Here is a basic usage example:

<?php
require 'vendor/autoload.php';  // Path may vary based on your setup

use PHPUnit\TextUI\Template;

$template = new Text_Template('path/to/templatefile');

$template->setVar(
    [
        'placeholder' => 'Value',
        // more placeholders...
    ]
);

echo $template->render();

In this example, a template file located at 'path/to/templatefile' is loaded. The setVar() method is employed to replace placeholders in the template with their corresponding values. Finally, the render() method is used to print the final text.

Please adjust this example as per your specific requirements.

Where are the phpunit/php-text-template docs?

The documentation of phpunit/php-text-template is not explicitly mentioned in the readme file. Perhaps the best way to obtain more detailed information or how-to guides about the library usage may be to check the source code, scrutinize GitHub issues, or look into the PHPUnit documentation since this library is a part of the PHPUnit framework. The GitHub repository URL for the project is https://github.com/sebastianbergmann/php-text-template.