-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
29 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm; | ||
/** Builds a Transphorm instance from the 3 constituent parts. XML template string, TSS string and data */ | ||
class Builder { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm; | ||
class Cache { | ||
private $cache; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm; | ||
class CssToXpath { | ||
private $specialChars = [' ', '.', '>', '~', '#', ':', '[', ']']; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm\Formatter; | ||
/** Date/time formatting for use in formmat: property*/ | ||
class Date { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm\Formatter; | ||
class Number { | ||
private $locale; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm\Formatter; | ||
class StringFormatter { | ||
public function uppercase($val) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm; | ||
interface Hook { | ||
public function run(\DomElement $element); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm\Hook; | ||
/* Handles data() and iteration() functions in the CDS */ | ||
class DataFunction { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
<?php | ||
/* @description Transformation Style Sheets - Revolutionising PHP templating * | ||
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 1.0 */ | ||
namespace Transphporm\Hook; | ||
class Formatter { | ||
private $formatters = []; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm\Hook; | ||
/** Hooks into the template system, gets assigned as `ul li` or similar and `run()` is called with any elements that match */ | ||
class PostProcess implements \Transphporm\Hook { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm\Hook; | ||
/** Determines whether $element matches the pseudo rule such as nth-child() or [attribute="value"] */ | ||
class PseudoMatcher { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm\Hook; | ||
/** Hooks into the template system, gets assigned as `ul li` or similar and `run()` is called with any elements that match */ | ||
class Rule implements \Transphporm\Hook { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm; | ||
interface Property { | ||
public function run($value, \DomElement $element, Hook\Rule $rule); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm\Property; | ||
class Bind implements \Transphporm\Property { | ||
private $data; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm\Property; | ||
class Content implements \Transphporm\Property { | ||
private $data; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm\Property; | ||
class Display implements \Transphporm\Property { | ||
public function run($value, \DomElement $element, \Transphporm\Hook\Rule $rule) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm\Property; | ||
class Repeat implements \Transphporm\Property { | ||
private $data; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
<?php | ||
/* @description Transformation Style Sheets - Revolutionising PHP templating * | ||
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 1.0 */ | ||
namespace Transphporm; | ||
class Rule { | ||
private $query; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm; | ||
/** Parses a .cds file into individual rules, each rule has a query e,g, `ul li` and a set of rules e.g. `display: none; data: iteration(id);` */ | ||
class Sheet { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm; | ||
class StringExtractor { | ||
private $str; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Tom Butler [email protected] * | ||
* @copyright 2015 Tom Butler <[email protected]> | https://r.je/ * | ||
* @license http://www.opensource.org/licenses/bsd-license.php BSD License * | ||
* @version 0.9 */ | ||
* @version 1.0 */ | ||
namespace Transphporm; | ||
/** Loads an XML string into a DomDocument and allows searching for specific elements using xpath based hooks */ | ||
class Template { | ||
|