Skip to content

Instantly share code, notes, and snippets.

@cognifloyd
Last active December 20, 2015 16:59
Show Gist options
  • Save cognifloyd/6165529 to your computer and use it in GitHub Desktop.
Save cognifloyd/6165529 to your computer and use it in GitHub Desktop.
The first code snippet that I want to get working in my GSoC project.
<?php
$derivative = new Derivative( 'Cognifire.SweetSitePackage' );
$derivative->file('Resources/Private/TextTypo3.txt')->cloneFromBoilerplate('Cognifire.EmptyBoilerplate');
@cognifloyd
Copy link
Author

It could also be

<?php
$derivative->fromBoilerplate('Cognifire.Emptyboilerplate')->file('Resources/Private/TextTypo3.txt')->copy(); //can't use clone.

OR

<?php
$derivative->file('Resources/Private/TextTypo3.txt')->fromBoilerplate('Cognifire.Emptyboilerplate')->copy(); //can't use clone.

Which would mean that cloneFromBoilerplate is a shortcut that runs clone() at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment