Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/goszowski/stub

1.0.0 2017-04-27 12:30 UTC

This package is auto-updated.

Last update: 2025-10-08 10:13:40 UTC


README

Total Downloads Latest Stable Version License

stub

Generate file from stub

Installation

	composer require goszowski\stub

Usage

<?php 

use Goszowski\Stub\Stub;

$stub = new Stub;
$stub->load('/path/to/stub/file');

$stub->replace('some_1', 'other_1');
$stub->replace('some_2', 'other_2');

// OR WITH ARRAY

$stub->replace([
  'some_1' => 'other_1',
  'some_2' => 'other_2',
]);

$stub->store('/path/to/save/file', 'filename');

Usage in Laravel

<?php 
namsepace App\YourNamespace;

use Facades\ {
  Goszowski\Stub\Stub
};

$stub = Stub::load('/path/to/stub/file');

$stub->replace('some_1', 'other_1');
$stub->replace('some_2', 'other_2');

// OR WITH ARRAY

$stub->replace([
  'some_1' => 'other_1',
  'some_2' => 'other_2',
]);

$stub->store('/path/to/save/file', 'filename');