Created
June 5, 2011 20:31
-
-
Save rgantt/1009388 to your computer and use it in GitHub Desktop.
sextile excerpt
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
<?php | |
class sextile { | |
protected $textile; | |
public function TextileThis( $text, $lite = '', $encode = '', $noimage = '', $strict = '', $rel = '' ) { | |
return $this->textile->TextileThis( $this->handle_latex( $text ), $lite, $encode, $noimage, $strict, $rel ); | |
} | |
/** | |
* Spoof interface compatibility | |
*/ | |
public function __call( $name, $params ) { | |
$ret = call_user_func_array( array( $this->textile, $name ), $params ); | |
if( $ret === false ) | |
throw new BadMethodCallException("Method {$name} does not exist in class Textile"); | |
return $ret; | |
} | |
public function __construct( Textile $textile ) { /* ... */ } | |
private function handle_latex( $text ){ /* ... */ } | |
} |
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
<?php | |
class Textile { | |
function Textile() { | |
// lots of constructor-y stuff | |
} | |
function TextileThis( $text, $lite='', $encode='', $noimage='', $strict='', $rel='' ) { | |
// text is inputted here, and then returned--after filtering--from here | |
} | |
/** | |
* Lots of other methods, most of which should never be called in isolation | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment