├── classes ├── parser │ ├── bbcode.php │ ├── textile.php │ ├── driver.php │ └── markdown.php ├── auth │ ├── strategy │ │ └── exception.php │ └── model │ │ └── social.php ├── swiftmail │ └── result.php ├── registry │ └── runtime.php ├── controller │ ├── hybrid.php │ ├── frontend.php │ └── core.php ├── cli.php ├── chart │ ├── bar.php │ ├── area.php │ ├── line.php │ ├── table.php │ ├── pie.php │ ├── scatter.php │ ├── geomap.php │ └── timeline.php ├── uri.php ├── parser.php └── view.php ├── vendor ├── decoda │ ├── emoticons │ │ ├── aw.png │ │ ├── hm.png │ │ ├── cool.png │ │ ├── gah.png │ │ ├── kiss.png │ │ ├── meh.png │ │ ├── mmf.png │ │ ├── sad.png │ │ ├── what.png │ │ ├── wink.png │ │ ├── angry.png │ │ ├── furious.png │ │ ├── happy.png │ │ ├── heart.png │ │ ├── tongue.png │ │ └── ecstatic.png │ ├── geshi │ │ └── geshi │ │ │ └── erlang.php │ ├── config │ │ └── emoticons.txt │ ├── README │ └── config.php ├── swift │ ├── dependency_maps │ │ ├── message_deps.php │ │ └── cache_deps.php │ ├── classes │ │ ├── Swift │ │ │ ├── Events │ │ │ │ ├── EventListener.php │ │ │ │ ├── TransportChangeEvent.php │ │ │ │ ├── CommandListener.php │ │ │ │ ├── ResponseListener.php │ │ │ │ ├── TransportExceptionListener.php │ │ │ │ ├── SendListener.php │ │ │ │ ├── Event.php │ │ │ │ ├── TransportExceptionEvent.php │ │ │ │ ├── TransportChangeListener.php │ │ │ │ ├── ResponseEvent.php │ │ │ │ ├── EventObject.php │ │ │ │ └── CommandEvent.php │ │ │ ├── Plugins │ │ │ │ ├── Timer.php │ │ │ │ ├── Sleeper.php │ │ │ │ ├── Pop │ │ │ │ │ ├── Pop3Exception.php │ │ │ │ │ └── Pop3Connection.php │ │ │ │ ├── Logger.php │ │ │ │ ├── Decorator │ │ │ │ │ └── Replacements.php │ │ │ │ ├── Reporter.php │ │ │ │ ├── Loggers │ │ │ │ │ ├── EchoLogger.php │ │ │ │ │ └── ArrayLogger.php │ │ │ │ ├── Reporters │ │ │ │ │ ├── HtmlReporter.php │ │ │ │ │ └── HitReporter.php │ │ │ │ ├── ImpersonatePlugin.php │ │ │ │ └── ReporterPlugin.php │ │ │ ├── FileStream.php │ │ │ ├── Mime │ │ │ │ ├── HeaderEncoder.php │ │ │ │ ├── CharsetObserver.php │ │ │ │ ├── EncodingObserver.php │ │ │ │ ├── ParameterizedHeader.php │ │ │ │ ├── HeaderEncoder │ │ │ │ │ ├── Base64HeaderEncoder.php │ │ │ │ │ └── QpHeaderEncoder.php │ │ │ │ ├── ContentEncoder.php │ │ │ │ ├── EmbeddedFile.php │ │ │ │ ├── HeaderFactory.php │ │ │ │ ├── Header.php │ │ │ │ └── ContentEncoder │ │ │ │ │ └── Base64ContentEncoder.php │ │ │ ├── SwiftException.php │ │ │ ├── IoException.php │ │ │ ├── ReplacementFilterFactory.php │ │ │ ├── CharacterReaderFactory.php │ │ │ ├── RfcComplianceException.php │ │ │ ├── DependencyException.php │ │ │ ├── TransportException.php │ │ │ ├── Filterable.php │ │ │ ├── StreamFilter.php │ │ │ ├── Encoder.php │ │ │ ├── Mailer │ │ │ │ ├── RecipientIterator.php │ │ │ │ └── ArrayRecipientIterator.php │ │ │ ├── Transport │ │ │ │ ├── MailInvoker.php │ │ │ │ ├── Esmtp │ │ │ │ │ ├── Authenticator.php │ │ │ │ │ └── Auth │ │ │ │ │ │ ├── PlainAuthenticator.php │ │ │ │ │ │ ├── LoginAuthenticator.php │ │ │ │ │ │ └── CramMd5Authenticator.php │ │ │ │ ├── SmtpAgent.php │ │ │ │ ├── SimpleMailInvoker.php │ │ │ │ ├── IoBuffer.php │ │ │ │ ├── NullTransport.php │ │ │ │ └── EsmtpHandler.php │ │ │ ├── Validate.php │ │ │ ├── NullTransport.php │ │ │ ├── SpoolTransport.php │ │ │ ├── OutputByteStream.php │ │ │ ├── MailTransport.php │ │ │ ├── FailoverTransport.php │ │ │ ├── LoadBalancedTransport.php │ │ │ ├── SendmailTransport.php │ │ │ ├── Spool.php │ │ │ ├── KeyCache │ │ │ │ └── KeyCacheInputStream.php │ │ │ ├── StreamFilters │ │ │ │ ├── StringReplacementFilterFactory.php │ │ │ │ └── StringReplacementFilter.php │ │ │ ├── Transport.php │ │ │ ├── SmtpTransport.php │ │ │ ├── ConfigurableSpool.php │ │ │ ├── Image.php │ │ │ ├── Encoding.php │ │ │ ├── MimePart.php │ │ │ ├── Encoder │ │ │ │ └── Base64Encoder.php │ │ │ ├── CharacterReader.php │ │ │ ├── EmbeddedFile.php │ │ │ ├── Attachment.php │ │ │ ├── CharacterReader │ │ │ │ └── UsAsciiReader.php │ │ │ ├── InputByteStream.php │ │ │ ├── Message.php │ │ │ └── Preferences.php │ │ └── Swift.php │ ├── swift_required.php │ ├── swift_required_pear.php │ ├── swift_init.php │ └── preferences.php └── textile │ └── example.php ├── docs ├── assets │ ├── js │ │ ├── prettify │ │ │ ├── lang-go.js │ │ │ ├── lang-lua.js │ │ │ ├── lang-ml.js │ │ │ ├── lang-sql.js │ │ │ ├── lang-tex.js │ │ │ ├── lang-vb.js │ │ │ ├── lang-scala.js │ │ │ ├── lang-vhdl.js │ │ │ ├── lang-wiki.js │ │ │ ├── lang-apollo.js │ │ │ ├── lang-proto.js │ │ │ ├── lang-yaml.js │ │ │ ├── lang-hs.js │ │ │ ├── lang-lisp.js │ │ │ ├── lang-css.js │ │ │ ├── prettify.css │ │ │ ├── lang-n.js │ │ │ └── lang-clj.js │ │ └── bootstrap-dropdown.js │ └── css │ │ └── main.css ├── template │ └── todo.html ├── controller │ ├── using_acl.html │ └── todo.html ├── classes │ ├── todo.html │ ├── tabs.html │ ├── currency.html │ ├── chart.html │ └── input.html └── auth │ └── todo.html ├── .gitignore ├── lang └── en │ └── autho.php ├── tasks └── registry.php ├── LICENSE ├── tests ├── parser │ ├── textile.php │ ├── bbcode.php │ └── markdown.php ├── parser.php ├── curl.php ├── factory.php ├── auth.php ├── uri.php ├── template.php └── chart.php └── README.md /classes/parser/bbcode.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/classes/parser/bbcode.php -------------------------------------------------------------------------------- /classes/parser/textile.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/classes/parser/textile.php -------------------------------------------------------------------------------- /vendor/decoda/emoticons/aw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/aw.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/hm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/hm.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/cool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/cool.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/gah.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/gah.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/kiss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/kiss.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/meh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/meh.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/mmf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/mmf.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/sad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/sad.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/what.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/what.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/wink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/wink.png -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-go.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/docs/assets/js/prettify/lang-go.js -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-lua.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/docs/assets/js/prettify/lang-lua.js -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-ml.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/docs/assets/js/prettify/lang-ml.js -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-sql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/docs/assets/js/prettify/lang-sql.js -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-tex.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/docs/assets/js/prettify/lang-tex.js -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-vb.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/docs/assets/js/prettify/lang-vb.js -------------------------------------------------------------------------------- /vendor/decoda/emoticons/angry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/angry.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/furious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/furious.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/happy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/happy.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/heart.png -------------------------------------------------------------------------------- /vendor/decoda/emoticons/tongue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/tongue.png -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-scala.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/docs/assets/js/prettify/lang-scala.js -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-vhdl.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/docs/assets/js/prettify/lang-vhdl.js -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-wiki.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/docs/assets/js/prettify/lang-wiki.js -------------------------------------------------------------------------------- /vendor/decoda/emoticons/ecstatic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/emoticons/ecstatic.png -------------------------------------------------------------------------------- /vendor/decoda/geshi/geshi/erlang.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/vendor/decoda/geshi/geshi/erlang.php -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-apollo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codenitive/fuel-hybrid/HEAD/docs/assets/js/prettify/lang-apollo.js -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.bak 3 | Thumbs.db 4 | desktop.ini 5 | .DS_Store 6 | .buildpath 7 | .project 8 | .settings 9 | .tmpoj 10 | nbproject/ 11 | .idea -------------------------------------------------------------------------------- /vendor/swift/dependency_maps/message_deps.php: -------------------------------------------------------------------------------- 1 | register('message.message') 6 | -> asNewInstanceOf('Swift_Message') 7 | 8 | -> register('message.mimepart') 9 | -> asNewInstanceOf('Swift_Mimepart'); 10 | -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-proto.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); 2 | -------------------------------------------------------------------------------- /lang/en/autho.php: -------------------------------------------------------------------------------- 1 | array( 5 | 'not_exist' => 'User :username does not exist in our database', 6 | 'not_linked' => 'No user linked with this account at the moment', 7 | 'bad_combination' => 'Invalid username and password combination', 8 | ), 9 | 'unauthorized' => 'You doesn\'t have privilege to do this action', 10 | ); -------------------------------------------------------------------------------- /vendor/textile/example.php: -------------------------------------------------------------------------------- 1 | TextileThis($in); 16 | 17 | // For untrusted user input, use TextileRestricted instead: 18 | // echo $textile->TextileRestricted($in); 19 | 20 | 21 | ?> 22 | -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-yaml.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]); 3 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Events/EventListener.php: -------------------------------------------------------------------------------- 1 | ( >:( >[ >:[ :angry: 2 | aw = :aw: 3 | cool = 8) 8] :cool: 4 | ecstatic = :D 8D :ecstatic: 5 | furious = >:D >< :furious: 6 | gah = D: :O :gah: 7 | happy = :) :] :happy: 8 | heart = <3 :heart: 9 | hm = :/ :hm: 10 | kiss = :3 :kiss: 11 | meh = :| -.- <_< >_> :meh: 12 | mmf = :x :mmf: 13 | sad = :( :[ ;( ;[ :sad: 14 | tongue = :P :tongue: 15 | what = :o :? :what: 16 | wink = ;) ;] :wink: -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-hs.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n \r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/, 2 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]); 3 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Plugins/Timer.php: -------------------------------------------------------------------------------- 1 | getSource(); 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Mime/EncodingObserver.php: -------------------------------------------------------------------------------- 1 | register('cache') 6 | -> asAliasOf('cache.array') 7 | 8 | -> register('tempdir') 9 | -> asValue('/tmp') 10 | 11 | -> register('cache.null') 12 | -> asSharedInstanceOf('Swift_KeyCache_NullKeyCache') 13 | 14 | -> register('cache.array') 15 | -> asSharedInstanceOf('Swift_KeyCache_ArrayKeyCache') 16 | -> withDependencies(array('cache.inputstream')) 17 | 18 | -> register('cache.disk') 19 | -> asSharedInstanceOf('Swift_KeyCache_DiskKeyCache') 20 | -> withDependencies(array('cache.inputstream', 'tempdir')) 21 | 22 | -> register('cache.inputstream') 23 | -> asNewInstanceOf('Swift_KeyCache_SimpleKeyCacheInputStream') 24 | 25 | ; 26 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/TransportException.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | class Auth_Strategy_Exception extends AuthException {} -------------------------------------------------------------------------------- /classes/parser/driver.php: -------------------------------------------------------------------------------- 1 | 27 | */ 28 | 29 | abstract class Parser_Driver 30 | { 31 | public abstract function parse($text = ''); 32 | } -------------------------------------------------------------------------------- /tasks/registry.php: -------------------------------------------------------------------------------- 1 | )/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Encoder.php: -------------------------------------------------------------------------------- 1 | 27 | */ 28 | 29 | class Swiftmail_Result 30 | { 31 | public $success = false; 32 | public $failures = null; 33 | public $total_sent = 0; 34 | 35 | public function __construct() {} 36 | 37 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Mailer/RecipientIterator.php: -------------------------------------------------------------------------------- 1 | 'Foo') or ('foo@bar' => NULL) 30 | * @return array 31 | */ 32 | public function nextRecipient(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Plugins/Pop/Pop3Connection.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | class Swift_Validate 15 | { 16 | /** 17 | * Grammar Object 18 | * @var Swift_Mime_Grammar 19 | */ 20 | private static $grammar = null; 21 | 22 | /** 23 | * Checks if an email matches the current grammars 24 | * @param string $email 25 | */ 26 | public static function email($email) 27 | { 28 | if (self::$grammar===null) 29 | { 30 | self::$grammar = Swift_DependencyContainer::getInstance() 31 | ->lookup('mime.grammar'); 32 | } 33 | return preg_match( 34 | '/^' . self::$grammar->getDefinition('addr-spec') . '$/D', 35 | $email 36 | ); 37 | } 38 | } -------------------------------------------------------------------------------- /vendor/swift/preferences.php: -------------------------------------------------------------------------------- 1 | setCharset('utf-8'); 11 | 12 | // Without these lines the default caching mechanism is "array" but this uses 13 | // a lot of memory. 14 | // If possible, use a disk cache to enable attaching large attachments etc 15 | if (function_exists('sys_get_temp_dir') && is_writable(sys_get_temp_dir())) 16 | { 17 | Swift_Preferences::getInstance() 18 | -> setTempDir(sys_get_temp_dir()) 19 | -> setCacheType('disk'); 20 | } 21 | 22 | Swift_Preferences::getInstance()->setQPDotEscape(false); 23 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/NullTransport.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * For the full copyright and license information, please view the LICENSE 8 | * file that was distributed with this source code. 9 | */ 10 | 11 | /** 12 | * Pretends messages have been sent, but just ignores them. 13 | * @package Swift 14 | * @author Fabien Potencier 15 | */ 16 | class Swift_NullTransport extends Swift_Transport_NullTransport 17 | { 18 | /** 19 | * Create a new NullTransport. 20 | */ 21 | public function __construct() 22 | { 23 | call_user_func_array( 24 | array($this, 'Swift_Transport_NullTransport::__construct'), 25 | Swift_DependencyContainer::getInstance() 26 | ->createDependenciesFor('transport.null') 27 | ); 28 | } 29 | 30 | /** 31 | * Create a new NullTransport instance. 32 | * @return Swift_NullTransport 33 | */ 34 | public static function newInstance() 35 | { 36 | return new self(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /classes/registry/runtime.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | 31 | class Registry_Runtime extends Registry_Driver 32 | { 33 | /** 34 | * @access protected 35 | * @var string storage configuration, currently only support runtime. 36 | */ 37 | protected $storage = 'runtime'; 38 | 39 | public function initiate() {} 40 | 41 | public function shutdown() {} 42 | 43 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Mime/ContentEncoder.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | abstract class Controller_Hybrid extends Controller 31 | { 32 | 33 | /** 34 | * Page template 35 | * 36 | * @access public 37 | * @var string 38 | */ 39 | public $template = 'normal'; 40 | 41 | /** 42 | * Auto render template 43 | * 44 | * @access public 45 | * @var bool 46 | */ 47 | public $auto_render = true; 48 | 49 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (C) 2011 by Fuel Hybrid Development Team 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /classes/parser/markdown.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | 31 | class Parser_Markdown extends Parser_Driver 32 | { 33 | /** 34 | * Parse markdown formatted text to HTML 35 | * 36 | * @access public 37 | * @param string $text 38 | * @return string 39 | */ 40 | public function parse($text = '') 41 | { 42 | if (empty($text) or ! strval($text)) 43 | { 44 | $text = ''; 45 | } 46 | 47 | return Markdown::parse($text); 48 | } 49 | 50 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/SpoolTransport.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * For the full copyright and license information, please view the LICENSE 8 | * file that was distributed with this source code. 9 | */ 10 | 11 | /** 12 | * Stores Messages in a queue. 13 | * @package Swift 14 | * @author Fabien Potencier 15 | */ 16 | class Swift_SpoolTransport extends Swift_Transport_SpoolTransport 17 | { 18 | /** 19 | * Create a new SpoolTransport. 20 | * @param Swift_Spool $spool 21 | */ 22 | public function __construct(Swift_Spool $spool) 23 | { 24 | $arguments = Swift_DependencyContainer::getInstance() 25 | ->createDependenciesFor('transport.spool'); 26 | 27 | $arguments[] = $spool; 28 | 29 | call_user_func_array( 30 | array($this, 'Swift_Transport_SpoolTransport::__construct'), 31 | $arguments 32 | ); 33 | } 34 | 35 | /** 36 | * Create a new SpoolTransport instance. 37 | * @param Swift_Spool $spool 38 | * @return Swift_SpoolTransport 39 | */ 40 | public static function newInstance(Swift_Spool $spool) 41 | { 42 | return new self($spool); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /docs/assets/js/prettify/prettify.css: -------------------------------------------------------------------------------- 1 | .com { color: #93a1a1; } 2 | .lit { color: #195f91; } 3 | .pun, .opn, .clo { color: #93a1a1; } 4 | .fun { color: #dc322f; } 5 | .str, .atv { color: #268bd2; } 6 | .kwd, .tag { color: #195f91; } 7 | .typ, .atn, .dec, .var { color: #CB4B16; } 8 | .pln { color: #93a1a1; } 9 | pre.prettyprint { 10 | background: #fefbf3; 11 | padding: 9px; 12 | border: 1px solid rgba(0,0,0,.2); 13 | -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1); 14 | -moz-box-shadow: 0 1px 2px rgba(0,0,0,.1); 15 | box-shadow: 0 1px 2px rgba(0,0,0,.1); 16 | } 17 | 18 | /* Specify class=linenums on a pre to get line numbering */ 19 | ol.linenums { margin: 0 0 0 40px; } /* IE indents via margin-left */ 20 | ol.linenums li { color: rgba(0,0,0,.15); line-height: 20px; } 21 | /* Alternate shading for lines */ 22 | li.L1, li.L3, li.L5, li.L7, li.L9 { } 23 | 24 | /* 25 | $base03: #002b36; 26 | $base02: #073642; 27 | $base01: #586e75; 28 | $base00: #657b83; 29 | $base0: #839496; 30 | $base1: #93a1a1; 31 | $base2: #eee8d5; 32 | $base3: #fdf6e3; 33 | $yellow: #b58900; 34 | $orange: #cb4b16; 35 | $red: #dc322f; 36 | $magenta: #d33682; 37 | $violet: #6c71c4; 38 | $blue: #268bd2; 39 | $cyan: #2aa198; 40 | $green: #859900; 41 | */ -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Events/TransportExceptionEvent.php: -------------------------------------------------------------------------------- 1 | _exception = $ex; 37 | } 38 | 39 | /** 40 | * Get the TransportException thrown. 41 | * @return Swift_TransportException 42 | */ 43 | public function getException() 44 | { 45 | return $this->_exception; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/OutputByteStream.php: -------------------------------------------------------------------------------- 1 | createDependenciesFor('transport.mail') 31 | ); 32 | 33 | $this->setExtraParams($extraParams); 34 | } 35 | 36 | /** 37 | * Create a new MailTransport instance. 38 | * @param string $extraParams To be passed to mail() 39 | * @return Swift_MailTransport 40 | */ 41 | public static function newInstance($extraParams = '-f%s') 42 | { 43 | return new self($extraParams); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/FailoverTransport.php: -------------------------------------------------------------------------------- 1 | createDependenciesFor('transport.failover') 31 | ); 32 | 33 | $this->setTransports($transports); 34 | } 35 | 36 | /** 37 | * Create a new FailoverTransport instance. 38 | * @param string $transports 39 | * @return Swift_FailoverTransport 40 | */ 41 | public static function newInstance($transports = array()) 42 | { 43 | return new self($transports); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /vendor/decoda/README: -------------------------------------------------------------------------------- 1 | Decoda v2.9 - BBCode Parser 2 | *************************** 3 | 4 | Requirements 5 | ============ 6 | 7 | * PHP 5.2.x 8 | * GeSHI 1.0.8.4 Library (Comes packaged in the Vendors) 9 | 10 | Contributors 11 | ============ 12 | 13 | * "Marten-Plain" Emoticons by Mårten Lundin - http://adiumxtras.com/index.php?a=xtras&xtra_id=6920 14 | * "GeSHi" Script - http://qbnz.com/highlighter/ 15 | 16 | Features 17 | ======== 18 | 19 | * Parses custom code to valid (X)HTML markup 20 | * Setting to make links and emails auto-clickable 21 | * Setting to use shorthand links and emails 22 | * Implements GeSHi for code highlighting 23 | * Implements the ability to censor words 24 | * Support for adding additional user code 25 | * Supports additional attributes for select tags 26 | * Supports the following: bold, italics, underline, alignment, color, font, sup, sub, font size, h1-h6, code (pre), urls, emails, images, divs, lists and quotes 27 | 28 | Documentation 29 | ============= 30 | 31 | * http://www.milesj.me/resources/script/decoda 32 | 33 | Installation 34 | ============ 35 | 36 | * Download the script into a directory called "decoda" 37 | * Include the script: include '/decoda/decoda.php'; 38 | * Parse the string: 39 | 40 | $code = new Decoda($string); 41 | $code->parse(); -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/LoadBalancedTransport.php: -------------------------------------------------------------------------------- 1 | createDependenciesFor('transport.loadbalanced') 31 | ); 32 | 33 | $this->setTransports($transports); 34 | } 35 | 36 | /** 37 | * Create a new LoadBalancedTransport instance. 38 | * @param string $transports 39 | * @return Swift_LoadBalancedTransport 40 | */ 41 | public static function newInstance($transports = array()) 42 | { 43 | return new self($transports); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/SendmailTransport.php: -------------------------------------------------------------------------------- 1 | createDependenciesFor('transport.sendmail') 31 | ); 32 | 33 | $this->setCommand($command); 34 | } 35 | 36 | /** 37 | * Create a new SendmailTransport instance. 38 | * @param string $command 39 | * @return Swift_SendmailTransport 40 | */ 41 | public static function newInstance($command = '/usr/sbin/sendmail -bs') 42 | { 43 | return new self($command); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Spool.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * For the full copyright and license information, please view the LICENSE 8 | * file that was distributed with this source code. 9 | */ 10 | 11 | /** 12 | * Interface for spools. 13 | * @package Swift 14 | * @author Fabien Potencier 15 | */ 16 | interface Swift_Spool 17 | { 18 | /** 19 | * Starts this Spool mechanism. 20 | */ 21 | public function start(); 22 | 23 | /** 24 | * Stops this Spool mechanism. 25 | */ 26 | public function stop(); 27 | 28 | /** 29 | * Tests if this Spool mechanism has started. 30 | * 31 | * @return boolean 32 | */ 33 | public function isStarted(); 34 | 35 | /** 36 | * Queues a message. 37 | * @param Swift_Mime_Message $message The message to store 38 | */ 39 | public function queueMessage(Swift_Mime_Message $message); 40 | 41 | /** 42 | * Sends messages using the given transport instance. 43 | * 44 | * @param Swift_Transport $transport A transport instance 45 | * @param string[] &$failedRecipients An array of failures by-reference 46 | * 47 | * @return int The number of sent emails 48 | */ 49 | public function flushQueue(Swift_Transport $transport, &$failedRecipients = null); 50 | } 51 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Plugins/Loggers/EchoLogger.php: -------------------------------------------------------------------------------- 1 | _isHtml = $isHtml; 32 | } 33 | 34 | /** 35 | * Add a log entry. 36 | * @param string $entry 37 | */ 38 | public function add($entry) 39 | { 40 | if ($this->_isHtml) 41 | { 42 | printf('%s%s%s', htmlspecialchars($entry, ENT_QUOTES), '
', PHP_EOL); 43 | } 44 | else 45 | { 46 | printf('%s%s', $entry, PHP_EOL); 47 | } 48 | } 49 | 50 | /** 51 | * Not implemented. 52 | */ 53 | public function clear() 54 | { 55 | } 56 | 57 | /** 58 | * Not implemented. 59 | */ 60 | public function dump() 61 | { 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /docs/assets/js/prettify/lang-n.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/, 3 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 4 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]); 5 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Plugins/Reporters/HtmlReporter.php: -------------------------------------------------------------------------------- 1 | " . PHP_EOL; 32 | echo "PASS " . $address . PHP_EOL; 33 | echo "" . PHP_EOL; 34 | flush(); 35 | } 36 | else 37 | { 38 | echo "
" . PHP_EOL; 39 | echo "FAIL " . $address . PHP_EOL; 40 | echo "
" . PHP_EOL; 41 | flush(); 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/KeyCache/KeyCacheInputStream.php: -------------------------------------------------------------------------------- 1 | 27 | */ 28 | 29 | class Cli extends \Fuel\Core\Cli 30 | { 31 | /** 32 | * An alias for Cli::write() to output $text only when specify -v or --verbose options 33 | * 34 | * @static 35 | * @access public 36 | * @param mixed $text the text to output, or array of lines 37 | * @param mixed $foreground the foreground color 38 | * @param mixed $background the background color 39 | * @return void 40 | */ 41 | public static function verbose($text = '', $foreground = null, $background = null) 42 | { 43 | if (null !== static::option('v', static::option('verbose'))) 44 | { 45 | static::write($text, $foreground, $background); 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /tests/parser/textile.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | /** 31 | * Parser_Textile class tests 32 | * 33 | * @group Hybrid 34 | * @group Parser_Textile 35 | */ 36 | class Test_Parser_Textile extends \Fuel\Core\TestCase 37 | { 38 | /** 39 | * Setup the test 40 | */ 41 | public function setup() 42 | { 43 | \Fuel::add_package('hybrid'); 44 | } 45 | 46 | /** 47 | * Test Parser_Textile::parse(); 48 | * 49 | * @test 50 | */ 51 | public function test_parse() 52 | { 53 | $text = '*hellow*'; 54 | $output = Parser::forge('textile')->parse($text);; 55 | $expected = "

hellow

"; 56 | 57 | $this->assertEquals($expected, $output); 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /tests/parser/bbcode.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | /** 31 | * Parser_Bbcode class tests 32 | * 33 | * @group Hybrid 34 | * @group Parser_Bbcode 35 | */ 36 | class Test_Parser_Bbcode extends \Fuel\Core\TestCase 37 | { 38 | /** 39 | * Setup the test 40 | */ 41 | public function setup() 42 | { 43 | \Fuel::add_package('hybrid'); 44 | } 45 | 46 | /** 47 | * Test Parser_Bbcode::parse(); 48 | * 49 | * @test 50 | */ 51 | public function test_parse() 52 | { 53 | $text = "[b]strong[/b][i]italic[/i]"; 54 | $output = Parser::forge('Bbcode')->parse($text); 55 | $expected = "strongitalic"; 56 | 57 | $this->assertEquals($expected, $output); 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Mime/EmbeddedFile.php: -------------------------------------------------------------------------------- 1 | setDisposition('inline'); 35 | $this->setId($this->getId()); 36 | } 37 | 38 | /** 39 | * Get the nesting level of this EmbeddedFile. 40 | * Returns {@link LEVEL_RELATED}. 41 | * @return int 42 | */ 43 | public function getNestingLevel() 44 | { 45 | return self::LEVEL_RELATED; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /tests/parser/markdown.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | /** 31 | * Parser_Bbcode class tests 32 | * 33 | * @group Hybrid 34 | * @group Parser_Bbcode 35 | */ 36 | class Test_Parser_Markdown extends \Fuel\Core\TestCase 37 | { 38 | /** 39 | * Setup the test 40 | */ 41 | public function setup() 42 | { 43 | \Package::load('hybrid'); 44 | } 45 | 46 | /** 47 | * Test Parser_Markdown::parse() 48 | * 49 | * @test 50 | */ 51 | public function test_parse() 52 | { 53 | $text = "Hello world 54 | 55 | * Thank you"; 56 | $output = Parser::forge('markdown')->parse($text); 57 | $expected = "

Hello world

58 | 59 | 62 | "; 63 | $this->assertEquals($expected, $output); 64 | } 65 | 66 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/StreamFilters/StringReplacementFilterFactory.php: -------------------------------------------------------------------------------- 1 | _filters[$search][$replace])) 33 | { 34 | if (!isset($this->_filters[$search])) 35 | { 36 | $this->_filters[$search] = array(); 37 | } 38 | 39 | if (!isset($this->_filters[$search][$replace])) 40 | { 41 | $this->_filters[$search][$replace] = array(); 42 | } 43 | 44 | $this->_filters[$search][$replace] 45 | = new Swift_StreamFilters_StringReplacementFilter($search, $replace); 46 | } 47 | 48 | return $this->_filters[$search][$replace]; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Mailer/ArrayRecipientIterator.php: -------------------------------------------------------------------------------- 1 | _recipients = $recipients; 36 | } 37 | 38 | /** 39 | * Returns true only if there are more recipients to send to. 40 | * @return boolean 41 | */ 42 | public function hasNext() 43 | { 44 | return !empty($this->_recipients); 45 | } 46 | 47 | /** 48 | * Returns an array where the keys are the addresses of recipients and the 49 | * values are the names. 50 | * e.g. ('foo@bar' => 'Foo') or ('foo@bar' => NULL) 51 | * @return array 52 | */ 53 | public function nextRecipient() 54 | { 55 | return array_splice($this->_recipients, 0, 1); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Events/TransportChangeListener.php: -------------------------------------------------------------------------------- 1 | executeCommand(sprintf("AUTH PLAIN %s\r\n", $message), array(235)); 45 | return true; 46 | } 47 | catch (Swift_TransportException $e) 48 | { 49 | $agent->executeCommand("RSET\r\n", array(250)); 50 | return false; 51 | } 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /docs/template/todo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Template — Fuel Hybrid Documentation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 |
23 |
24 | 28 |
29 |
30 | 31 |
32 | 33 | 36 | 37 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Transport.php: -------------------------------------------------------------------------------- 1 | createDependenciesFor('transport.smtp') 34 | ); 35 | 36 | $this->setHost($host); 37 | $this->setPort($port); 38 | $this->setEncryption($security); 39 | } 40 | 41 | /** 42 | * Create a new SmtpTransport instance. 43 | * @param string $host 44 | * @param int $port 45 | * @param int $security 46 | * @return Swift_SmtpTransport 47 | */ 48 | public static function newInstance($host = 'localhost', $port = 25, 49 | $security = null) 50 | { 51 | return new self($host, $port, $security); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /classes/controller/frontend.php: -------------------------------------------------------------------------------- 1 | 31 | */ 32 | 33 | abstract class Controller_Frontend extends Controller_Template 34 | { 35 | /** 36 | * Page template 37 | * 38 | * @access public 39 | * @var string 40 | */ 41 | public $template = 'frontend'; 42 | 43 | /** 44 | * Auto render template 45 | * 46 | * @access public 47 | * @var bool 48 | */ 49 | public $auto_render = true; 50 | 51 | /** 52 | * This method will be called after we route to the destinated method 53 | * 54 | * @access public 55 | * @return void 56 | */ 57 | public function before() 58 | { 59 | Log::warning('This Class is deprecated. Please use a Hybrid\Controller_Template instead.', __CLASS__); 60 | 61 | return parent::before(); 62 | } 63 | 64 | } -------------------------------------------------------------------------------- /docs/controller/using_acl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Controller — Hybrid for FuelPHP Documentation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 |
23 |
24 | 28 |
29 |
30 | 31 |
32 | 33 | 36 | 37 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /tests/parser.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | /** 31 | * Parser class tests 32 | * 33 | * @group Hybrid 34 | * @group Parser 35 | */ 36 | class Test_Parser extends \Fuel\Core\TestCase 37 | { 38 | /** 39 | * Setup the test 40 | */ 41 | public function setup() 42 | { 43 | \Package::load('hybrid'); 44 | } 45 | 46 | /** 47 | * Test Parser::forge(); 48 | * 49 | * @test 50 | */ 51 | public function test_forge() 52 | { 53 | $output = Parser::make('markdown'); 54 | 55 | $this->assertTrue($output instanceof \Hybrid\Parser_Markdown); 56 | } 57 | 58 | /** 59 | * Test Parser::forge() given invalid driver 60 | * 61 | * @test 62 | * @expectedException \FuelException 63 | */ 64 | public function test_forge_expected_exception_given_invalid_driver() 65 | { 66 | Parser::make('html'); 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /tests/curl.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | /** 31 | * Curl class tests 32 | * 33 | * @group Hybrid 34 | * @group Curl 35 | */ 36 | class Test_Curl extends \Fuel\Core\TestCase 37 | { 38 | /** 39 | * Setup the test 40 | */ 41 | public function setup() 42 | { 43 | \Package::load('hybrid'); 44 | } 45 | 46 | /** 47 | * Test Curl::forge(); 48 | * 49 | * @test 50 | */ 51 | public function test_forge() 52 | { 53 | $output = Curl::make('GET http://google.com'); 54 | 55 | $this->assertTrue($output instanceof \Hybrid\Curl); 56 | } 57 | 58 | /** 59 | * Test Curl::forge() given invalid driver 60 | * 61 | * @test 62 | * @expectedException \FuelException 63 | */ 64 | public function test_forge_expected_exception_given_invalid_method() 65 | { 66 | Curl::make('FORK http://google.com'); 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Events/ResponseEvent.php: -------------------------------------------------------------------------------- 1 | _response = $response; 43 | $this->_valid = $valid; 44 | } 45 | 46 | /** 47 | * Get the response which was received from the server. 48 | * @return string 49 | */ 50 | public function getResponse() 51 | { 52 | return $this->_response; 53 | } 54 | 55 | /** 56 | * Get the success status of this Event. 57 | * @return boolean 58 | */ 59 | public function isValid() 60 | { 61 | return $this->_valid; 62 | } 63 | 64 | } -------------------------------------------------------------------------------- /docs/classes/todo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Class — Hybrid for FuelPHP Documentation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 |
23 |
24 | 28 |
29 |
30 | 31 |
32 | 33 | 36 | 37 |

38 | Class description 39 |

40 | 41 | 47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/ConfigurableSpool.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * For the full copyright and license information, please view the LICENSE 8 | * file that was distributed with this source code. 9 | */ 10 | 11 | /** 12 | * Base class for Spools (implements time and message limits). 13 | * @package Swift 14 | * @author Fabien Potencier 15 | */ 16 | abstract class Swift_ConfigurableSpool implements Swift_Spool 17 | { 18 | /** The maximum number of messages to send per flush */ 19 | private $_message_limit; 20 | 21 | /** The time limit per flush */ 22 | private $_time_limit; 23 | 24 | /** 25 | * Sets the maximum number of messages to send per flush. 26 | * @param int $limit The limit 27 | */ 28 | public function setMessageLimit($limit) 29 | { 30 | $this->_message_limit = (int) $limit; 31 | } 32 | 33 | /** 34 | * Gets the maximum number of messages to send per flush. 35 | * @return int The limit 36 | */ 37 | public function getMessageLimit() 38 | { 39 | return $this->_message_limit; 40 | } 41 | 42 | /** 43 | * Sets the time limit (in seconds) per flush. 44 | * @param int $limit The limit 45 | */ 46 | public function setTimeLimit($limit) 47 | { 48 | $this->_time_limit = (int) $limit; 49 | } 50 | 51 | /** 52 | * Gets the time limit (in seconds) per flush. 53 | * @return int The limit 54 | */ 55 | public function getTimeLimit() 56 | { 57 | return $this->_time_limit; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php: -------------------------------------------------------------------------------- 1 | executeCommand("AUTH LOGIN\r\n", array(334)); 44 | $agent->executeCommand(sprintf("%s\r\n", base64_encode($username)), array(334)); 45 | $agent->executeCommand(sprintf("%s\r\n", base64_encode($password)), array(235)); 46 | return true; 47 | } 48 | catch (Swift_TransportException $e) 49 | { 50 | $agent->executeCommand("RSET\r\n", array(250)); 51 | return false; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /docs/classes/tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Tabs Class — Hybrid for FuelPHP Documentation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 |
23 |
24 | 28 |
29 |
30 | 31 |
32 | 33 | 36 | 37 |

38 | Class description 39 |

40 | 41 | 47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/classes/currency.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Currency Class — Hybrid for FuelPHP Documentation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 |
23 |
24 | 28 |
29 |
30 | 31 |
32 | 33 | 36 | 37 |

38 | Class description 39 |

40 | 41 | 47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Plugins/Loggers/ArrayLogger.php: -------------------------------------------------------------------------------- 1 | _size = $size; 41 | } 42 | 43 | /** 44 | * Add a log entry. 45 | * @param string $entry 46 | */ 47 | public function add($entry) 48 | { 49 | $this->_log[] = $entry; 50 | while (count($this->_log) > $this->_size) 51 | { 52 | array_shift($this->_log); 53 | } 54 | } 55 | 56 | /** 57 | * Clear the log contents. 58 | */ 59 | public function clear() 60 | { 61 | $this->_log = array(); 62 | } 63 | 64 | /** 65 | * Get this log as a string. 66 | * @return string 67 | */ 68 | public function dump() 69 | { 70 | return implode(PHP_EOL, $this->_log); 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /docs/classes/chart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Chart Class — Hybrid for FuelPHP Documentation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 |
23 |
24 | 28 |
29 |
30 | 31 |
32 | 33 | 36 | 37 |

38 | Class description 39 |

40 | 41 | 47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Events/EventObject.php: -------------------------------------------------------------------------------- 1 | _source = $source; 35 | } 36 | 37 | /** 38 | * Get the source object of this event. 39 | * @return object 40 | */ 41 | public function getSource() 42 | { 43 | return $this->_source; 44 | } 45 | 46 | /** 47 | * Prevent this Event from bubbling any further up the stack. 48 | * @param boolean $cancel, optional 49 | */ 50 | public function cancelBubble($cancel = true) 51 | { 52 | $this->_bubbleCancelled = $cancel; 53 | } 54 | 55 | /** 56 | * Returns true if this Event will not bubble any further up the stack. 57 | * @return boolean 58 | */ 59 | public function bubbleCancelled() 60 | { 61 | return $this->_bubbleCancelled; 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /tests/factory.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | /** 31 | * Factory class tests 32 | * 33 | * @group Hybrid 34 | * @group Factory 35 | */ 36 | class Test_Factory extends \Fuel\Core\TestCase 37 | { 38 | /** 39 | * Setup the test 40 | */ 41 | public function setup() 42 | { 43 | \Package::load('hybrid'); 44 | } 45 | 46 | /** 47 | * Test Factory::get_language(); 48 | * 49 | * @test 50 | */ 51 | public function test_language() 52 | { 53 | $expected = \Config::get('language'); 54 | $output = Factory::get_language(); 55 | 56 | $this->assertEquals($expected, $output); 57 | } 58 | 59 | /** 60 | * Test Factory::get_identity(); 61 | * 62 | * @test 63 | */ 64 | public function test_identity() 65 | { 66 | $expected = \Config::get('app.identity'); 67 | $output = Factory::get_identity(); 68 | 69 | $this->assertEquals($expected, $output); 70 | } 71 | 72 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Image.php: -------------------------------------------------------------------------------- 1 | setFile( 55 | new Swift_ByteStream_FileByteStream($path) 56 | ); 57 | return $image; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /tests/auth.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | /** 31 | * Auth class tests 32 | * 33 | * @group Hybrid 34 | * @group Auth 35 | */ 36 | class Test_Auth extends \Fuel\Core\TestCase 37 | { 38 | 39 | /** 40 | * Setup the test 41 | */ 42 | public function setup() 43 | { 44 | \Package::load('hybrid'); 45 | 46 | \Config::load('autho', 'autho'); 47 | 48 | \Config::set('autho.hash_type', 'sha1'); 49 | \Config::set('autho.salt', '12345'); 50 | } 51 | 52 | /** 53 | * Test Auth::create_hash(); 54 | * 55 | * @test 56 | */ 57 | public function test_create_hash() 58 | { 59 | $string = 'helloworld123'; 60 | $expected = sha1('12345'.$string); 61 | $output = Auth::create_hash($string); 62 | 63 | $this->assertEquals($expected, $output); 64 | 65 | $string = 'helloworld123'; 66 | $expected = md5('12345'.$string); 67 | $output = Auth::create_hash($string, 'md5'); 68 | 69 | $this->assertEquals($expected, $output); 70 | } 71 | 72 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Events/CommandEvent.php: -------------------------------------------------------------------------------- 1 | _command = $command; 44 | $this->_successCodes = $successCodes; 45 | } 46 | 47 | /** 48 | * Get the command which was sent to the server. 49 | * @return string 50 | */ 51 | public function getCommand() 52 | { 53 | return $this->_command; 54 | } 55 | 56 | /** 57 | * Get the numeric response codes which indicate success for this command. 58 | * @return int[] 59 | */ 60 | public function getSuccessCodes() 61 | { 62 | return $this->_successCodes; 63 | } 64 | 65 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Plugins/Reporters/HitReporter.php: -------------------------------------------------------------------------------- 1 | _failures_cache[$address])) 38 | { 39 | $this->_failures[] = $address; 40 | $this->_failures_cache[$address] = true; 41 | } 42 | } 43 | 44 | /** 45 | * Get an array of addresses for which delivery failed. 46 | * @return array 47 | */ 48 | public function getFailedRecipients() 49 | { 50 | return $this->_failures; 51 | } 52 | 53 | /** 54 | * Clear the buffer (empty the list). 55 | */ 56 | public function clear() 57 | { 58 | $this->_failures = $this->_failures_cache = array(); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /classes/auth/model/social.php: -------------------------------------------------------------------------------- 1 | 31 | */ 32 | 33 | class Auth_Model_Social extends Model_Crud 34 | { 35 | protected static $_table_name = 'authentications'; 36 | 37 | protected static $_mysql_timestamp; 38 | 39 | protected static $_created_at; 40 | 41 | protected static $_updated_at; 42 | 43 | public static function _init() 44 | { 45 | Config::load('autho', 'autho'); 46 | Config::load('hybrid', 'hybrid'); 47 | 48 | $config = Config::get('autho.mysql_timestamp'); 49 | static::$_table_name = Config::get('hybrid.tables.social', static::$_table_name); 50 | 51 | switch ($config) 52 | { 53 | case true : 54 | case false : 55 | static::$_created_at = 'created_at'; 56 | static::$_updated_at = 'updated_at'; 57 | static::$_mysql_timestamp = $config; 58 | break; 59 | 60 | case null : 61 | default : 62 | // don't do anything 63 | } 64 | } 65 | 66 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Encoding.php: -------------------------------------------------------------------------------- 1 | lookup($key); 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /tests/uri.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | /** 31 | * Uri class tests 32 | * 33 | * @group Hybrid 34 | * @group Uri 35 | */ 36 | class Test_Uri extends \Fuel\Core\TestCase 37 | { 38 | /** 39 | * Setup the test 40 | */ 41 | public function setup() 42 | { 43 | \Package::load('hybrid'); 44 | 45 | $_GET = array( 46 | 'hello' => 'world', 47 | 'foo' => 'bar', 48 | 'fuel' => 'php', 49 | ); 50 | } 51 | 52 | /** 53 | * Test Uri::build_get_query() 54 | * 55 | * @test 56 | */ 57 | public function test_build_get_query() 58 | { 59 | $output = Uri::build_get_query(array('foo', 'hello')); 60 | $expected = '?foo=bar&hello=world'; 61 | $this->assertEquals($expected, $output); 62 | 63 | $output = Uri::build_get_query(array('foo', 'unavailable')); 64 | $expected = '?foo=bar'; 65 | $this->assertEquals($expected, $output); 66 | 67 | $output = Uri::build_get_query(array('unavailable')); 68 | $expected = '?'; 69 | $this->assertEquals($expected, $output); 70 | } 71 | 72 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/MimePart.php: -------------------------------------------------------------------------------- 1 | createDependenciesFor('mime.part') 35 | ); 36 | 37 | if (!isset($charset)) 38 | { 39 | $charset = Swift_DependencyContainer::getInstance() 40 | ->lookup('properties.charset'); 41 | } 42 | $this->setBody($body); 43 | $this->setCharset($charset); 44 | if ($contentType) 45 | { 46 | $this->setContentType($contentType); 47 | } 48 | } 49 | 50 | /** 51 | * Create a new MimePart. 52 | * @param string $body 53 | * @param string $contentType 54 | * @param string $charset 55 | * @return Swift_Mime_MimePart 56 | */ 57 | public static function newInstance($body = null, $contentType = null, 58 | $charset = null) 59 | { 60 | return new self($body, $contentType, $charset); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /tests/template.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | /** 31 | * Template class tests 32 | * 33 | * @group Hybrid 34 | * @group Template 35 | */ 36 | class Test_Template extends \Fuel\Core\TestCase 37 | { 38 | /** 39 | * Setup the test 40 | */ 41 | public function setup() 42 | { 43 | \Package::load('hybrid'); 44 | } 45 | 46 | /** 47 | * Test Template::forge(); 48 | * 49 | * @test 50 | */ 51 | public function test_forge() 52 | { 53 | try 54 | { 55 | $output = Template::make('normal'); 56 | } 57 | catch (\FuelException $e) 58 | { 59 | $this->markTestSkipped("config/hybrid.php is not configured or Template_Normal not in used"); 60 | } 61 | 62 | $this->assertTrue($output instanceof \Hybrid\Template_Normal); 63 | } 64 | 65 | /** 66 | * Test Template::forge() given invalid driver 67 | * 68 | * @test 69 | * @expectedException \FuelException 70 | */ 71 | public function test_forge_expected_exception_given_invalid_driver() 72 | { 73 | Template::make('helloworld'); 74 | } 75 | 76 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift.php: -------------------------------------------------------------------------------- 1 | . 18 | 19 | */ 20 | 21 | 22 | /** 23 | * This is the implementation class for {@link Swift_Transport_MailInvoker}. 24 | * 25 | * @package Swift 26 | * @subpackage Transport 27 | * @author Chris Corbyn 28 | */ 29 | class Swift_Transport_SimpleMailInvoker implements Swift_Transport_MailInvoker 30 | { 31 | 32 | /** 33 | * Send mail via the mail() function. 34 | * 35 | * This method takes the same arguments as PHP mail(). 36 | * 37 | * @param string $to 38 | * @param string $subject 39 | * @param string $body 40 | * @param string $headers 41 | * @param string $extraParams 42 | * 43 | * @return boolean 44 | */ 45 | public function mail($to, $subject, $body, $headers = null, $extraParams = null) 46 | { 47 | if (!ini_get('safe_mode')) 48 | { 49 | return mail($to, $subject, $body, $headers, $extraParams); 50 | } 51 | else 52 | { 53 | return mail($to, $subject, $body, $headers); 54 | } 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /docs/auth/todo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Auth — Hybrid for FuelPHP Documentation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 |
23 |
24 | 28 |
29 |
30 | 31 |
32 | 33 | 36 | 37 |

38 | The Auth classes provides a standardized interface for authentication in Fuel. This allows our users to write their own drivers and easily integrate a new driver to work with old code by keeping the basic methods consistent. 39 |

40 | 41 | 47 |
48 | 49 | 50 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/StreamFilters/StringReplacementFilter.php: -------------------------------------------------------------------------------- 1 | _search = $search; 34 | $this->_replace = $replace; 35 | } 36 | 37 | /** 38 | * Returns true if based on the buffer passed more bytes should be buffered. 39 | * @param string $buffer 40 | * @return boolean 41 | */ 42 | public function shouldBuffer($buffer) 43 | { 44 | $endOfBuffer = substr($buffer, -1); 45 | foreach ((array) $this->_search as $needle) 46 | { 47 | if (false !== strpos($needle, $endOfBuffer)) 48 | { 49 | return true; 50 | } 51 | } 52 | return false; 53 | } 54 | 55 | /** 56 | * Perform the actual replacements on $buffer and return the result. 57 | * @param string $buffer 58 | * @return string 59 | */ 60 | public function filter($buffer) 61 | { 62 | return str_replace($this->_search, $this->_replace, $buffer); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Encoder/Base64Encoder.php: -------------------------------------------------------------------------------- 1 | = $maxLineLength || 76 < $maxLineLength) 35 | { 36 | $maxLineLength = 76; 37 | } 38 | 39 | $encodedString = base64_encode($string); 40 | $firstLine = ''; 41 | 42 | if (0 != $firstLineOffset) 43 | { 44 | $firstLine = substr( 45 | $encodedString, 0, $maxLineLength - $firstLineOffset 46 | ) . "\r\n"; 47 | $encodedString = substr( 48 | $encodedString, $maxLineLength - $firstLineOffset 49 | ); 50 | } 51 | 52 | return $firstLine . trim(chunk_split($encodedString, $maxLineLength, "\r\n")); 53 | } 54 | 55 | /** 56 | * Does nothing. 57 | */ 58 | public function charsetChanged($charset) 59 | { 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /classes/chart/bar.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | 31 | class Chart_Bar extends Chart_Driver 32 | { 33 | public function __construct() 34 | { 35 | parent::__construct(); 36 | 37 | $this->set_options(Config::get('chart.bar', array())); 38 | } 39 | 40 | public function render($width = '100%', $height = '300px') 41 | { 42 | $columns = $this->columns; 43 | $rows = $this->rows; 44 | 45 | $this->set_options('width', $width); 46 | $this->set_options('height', $height); 47 | 48 | $options = json_encode($this->options); 49 | 50 | $id = 'barchart_'.md5($columns.$rows.time().microtime()); 51 | 52 | return << 66 | SCRIPT; 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /classes/chart/area.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | 31 | class Chart_Area extends Chart_Driver 32 | { 33 | public function __construct() 34 | { 35 | parent::__construct(); 36 | 37 | $this->set_options(Config::get('chart.area', array())); 38 | } 39 | 40 | public function render($width = '100%', $height = '300px') 41 | { 42 | $columns = $this->columns; 43 | $rows = $this->rows; 44 | 45 | $this->set_options('width', $width); 46 | $this->set_options('height', $height); 47 | 48 | $options = json_encode($this->options); 49 | 50 | $id = 'areachart_'.md5($columns.$rows.time().microtime()); 51 | 52 | return << 66 | SCRIPT; 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /classes/chart/line.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | 31 | class Chart_Line extends Chart_Driver 32 | { 33 | public function __construct() 34 | { 35 | parent::__construct(); 36 | 37 | $this->set_options(Config::get('chart.line', array())); 38 | } 39 | 40 | public function render($width = '100%', $height = '300px') 41 | { 42 | $columns = $this->columns; 43 | $rows = $this->rows; 44 | 45 | $this->set_options('width', $width); 46 | $this->set_options('height', $height); 47 | 48 | $options = json_encode($this->options); 49 | 50 | $id = 'linechart_'.md5($columns.$rows.time().microtime()); 51 | 52 | return << 66 | SCRIPT; 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /tests/chart.php: -------------------------------------------------------------------------------- 1 | 28 | */ 29 | 30 | /** 31 | * Chart class tests 32 | * 33 | * @group Hybrid 34 | * @group Chart 35 | */ 36 | class Test_Chart extends \Fuel\Core\TestCase 37 | { 38 | /** 39 | * Setup the test 40 | */ 41 | public function setup() 42 | { 43 | \Package::load('hybrid'); 44 | } 45 | 46 | /** 47 | * Test Chart::forge() 48 | * 49 | * @test 50 | */ 51 | public function test_forge() 52 | { 53 | $output = Chart::make('timeline'); 54 | 55 | $this->assertTrue($output instanceof \Hybrid\Chart_Timeline); 56 | } 57 | 58 | /** 59 | * Test Chart::forge() given invalid driver 60 | * 61 | * @test 62 | * @expectedException \FuelException 63 | */ 64 | public function test_forge_expected_exception_given_invalid_driver() 65 | { 66 | $output = Chart::make('date'); 67 | } 68 | 69 | /** 70 | * Test Chart::js() 71 | * 72 | * @test 73 | */ 74 | public function test_js() 75 | { 76 | $expected = ''; 77 | $output = Chart::js(); 78 | 79 | $this->assertEquals($expected, $output); 80 | } 81 | 82 | } -------------------------------------------------------------------------------- /classes/chart/table.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | 31 | class Chart_Table extends Chart_Driver 32 | { 33 | public function __construct() 34 | { 35 | parent::__construct(); 36 | 37 | $this->set_options(Config::get('chart.table', array())); 38 | } 39 | 40 | public function render($width = '100%', $height = '300px') 41 | { 42 | $columns = $this->columns; 43 | $rows = $this->rows; 44 | 45 | $this->set_options('width', $width); 46 | $this->set_options('height', $height); 47 | 48 | $options = json_encode($this->options); 49 | 50 | $id = 'table_'.md5($columns.$rows.time()); 51 | 52 | return << 66 | SCRIPT; 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /classes/chart/pie.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | 31 | class Chart_Pie extends Chart_Driver 32 | { 33 | public function __construct() 34 | { 35 | parent::__construct(); 36 | 37 | $this->set_options(Config::get('chart.pie', array())); 38 | } 39 | 40 | public function render($width = '100%', $height = '300px') 41 | { 42 | $columns = $this->columns; 43 | $rows = $this->rows; 44 | 45 | $this->set_options('width', $width); 46 | $this->set_options('height', $height); 47 | 48 | $options = json_encode($this->options); 49 | 50 | $id = 'pie_'.md5($columns.$rows.time().microtime()); 51 | 52 | return << 66 | SCRIPT; 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /classes/chart/scatter.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | 31 | class Chart_Scatter extends Chart_Driver 32 | { 33 | public function __construct() 34 | { 35 | parent::__construct(); 36 | 37 | $this->set_options(Config::get('chart.scatter', array())); 38 | } 39 | 40 | public function render($width = '100%', $height = '300px') 41 | { 42 | $columns = $this->columns; 43 | $rows = $this->rows; 44 | 45 | $this->set_options('width', $width); 46 | $this->set_options('height', $height); 47 | 48 | $options = json_encode($this->options); 49 | 50 | $id = 'scatter_'.md5($columns.$rows.time().microtime()); 51 | 52 | return << 66 | SCRIPT; 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /classes/uri.php: -------------------------------------------------------------------------------- 1 | 27 | */ 28 | 29 | class Uri extends \Fuel\Core\Uri 30 | { 31 | /** 32 | * Build query string 33 | * 34 | * @static 35 | * @access public 36 | * @param mixed $data 37 | * @param string $start_with Default string set to ? 38 | * @return string 39 | */ 40 | public static function build_get_query($data = null, $start_with = '?') 41 | { 42 | $values = array(); 43 | ! is_null($data) or $data = '*'; 44 | 45 | if (is_string($data)) 46 | { 47 | if ('*' === $data) 48 | { 49 | $data = Input::get(); 50 | } 51 | else 52 | { 53 | $data = array($data); 54 | } 55 | } 56 | 57 | if (null === $data or ! is_array($data)) 58 | { 59 | return ''; 60 | } 61 | 62 | foreach ($data as $key => $value) 63 | { 64 | // Use $_GET value overwriting if given. 65 | if ( ! is_numeric($key)) 66 | { 67 | $input = $value; 68 | } 69 | else 70 | { 71 | $key = $value; 72 | $input = Input::get($value); 73 | } 74 | 75 | if (null !== $input and ! empty($input)) 76 | { 77 | $values[$key] = $input; 78 | } 79 | } 80 | 81 | return $start_with.http_build_query($values); 82 | } 83 | 84 | } -------------------------------------------------------------------------------- /classes/chart/geomap.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | 31 | class Chart_GeoMap extends Chart_Driver 32 | { 33 | public function __construct() 34 | { 35 | parent::__construct(); 36 | 37 | $this->set_options(Config::get('chart.geomap', array())); 38 | } 39 | 40 | public function render($width = '100%', $height = '300px') 41 | { 42 | $columns = $this->columns; 43 | $rows = $this->rows; 44 | 45 | $this->set_options('width', $width); 46 | $this->set_options('height', $height); 47 | 48 | $options = json_encode($this->options); 49 | 50 | $id = 'geomap_'.md5($columns.$rows.time().microtime()); 51 | 52 | return << 67 | SCRIPT; 68 | } 69 | 70 | } 71 | 72 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/CharacterReader.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | interface Swift_CharacterReader 19 | { 20 | const MAP_TYPE_INVALID = 0x01; 21 | const MAP_TYPE_FIXED_LEN = 0x02; 22 | const MAP_TYPE_POSITIONS = 0x03; 23 | 24 | /** 25 | * Returns the complete charactermap 26 | * 27 | * @param string $string 28 | * @param int $startOffset 29 | * @param array $currentMap 30 | * @param mixed $ignoredChars 31 | * @return int 32 | */ 33 | public function getCharPositions($string, $startOffset, &$currentMap, &$ignoredChars); 34 | 35 | /** 36 | * Returns mapType 37 | * @int mapType 38 | */ 39 | public function getMapType(); 40 | 41 | /** 42 | * Returns an integer which specifies how many more bytes to read. 43 | * A positive integer indicates the number of more bytes to fetch before invoking 44 | * this method again. 45 | * A value of zero means this is already a valid character. 46 | * A value of -1 means this cannot possibly be a valid character. 47 | * @param int[] $bytes 48 | * @return int 49 | */ 50 | public function validateByteSequence($bytes, $size); 51 | 52 | /** 53 | * Returns the number of bytes which should be read to start each character. 54 | * For fixed width character sets this should be the number of 55 | * octets-per-character. For multibyte character sets this will probably be 1. 56 | * @return int 57 | */ 58 | public function getInitialByteSize(); 59 | 60 | } 61 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Transport/IoBuffer.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | 31 | class Chart_Timeline extends Chart_Driver 32 | { 33 | public function __construct() 34 | { 35 | parent::__construct(); 36 | 37 | $this->set_options(Config::get('chart.timeline', array())); 38 | } 39 | 40 | public function render($width = '100%', $height = '300px') 41 | { 42 | $columns = $this->columns; 43 | $rows = $this->rows; 44 | 45 | $this->set_options('width', $width); 46 | $this->set_options('height', $height); 47 | 48 | $options = json_encode($this->options); 49 | 50 | $id = 'timeline_'.md5($columns.$rows.time().microtime()); 51 | 52 | return << 66 | SCRIPT; 67 | } 68 | 69 | } 70 | 71 | -------------------------------------------------------------------------------- /docs/assets/js/bootstrap-dropdown.js: -------------------------------------------------------------------------------- 1 | /* ============================================================ 2 | * bootstrap-dropdown.js v1.3.0 3 | * http://twitter.github.com/bootstrap/javascript.html#dropdown 4 | * ============================================================ 5 | * Copyright 2011 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | 21 | !function( $ ){ 22 | 23 | /* DROPDOWN PLUGIN DEFINITION 24 | * ========================== */ 25 | 26 | $.fn.dropdown = function ( selector ) { 27 | return this.each(function () { 28 | $(this).delegate(selector || d, 'click', function (e) { 29 | var li = $(this).parent('li') 30 | , isActive = li.hasClass('open') 31 | 32 | clearMenus() 33 | !isActive && li.toggleClass('open') 34 | return false 35 | }) 36 | }) 37 | } 38 | 39 | /* APPLY TO STANDARD DROPDOWN ELEMENTS 40 | * =================================== */ 41 | 42 | var d = 'a.menu, .dropdown-toggle' 43 | 44 | function clearMenus() { 45 | $(d).parent('li').removeClass('open') 46 | } 47 | 48 | $(function () { 49 | $('html').bind("click", clearMenus) 50 | $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' ) 51 | }) 52 | 53 | }( window.jQuery || window.ender ); 54 | -------------------------------------------------------------------------------- /docs/controller/todo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Controller — Hybrid for FuelPHP Documentation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 |
23 |
24 | 28 |
29 |
30 | 31 |
32 | 33 | 36 |

37 | Controllers are classes that can be reached through the URL and take care of handling the request. A controller calls models and other classes to fetch the information. Finally, it will pass everything to a view for output. If a URL like www.yoursite.com/example/index is requested, the first segment ("example") will be the controller that is called and the second segment ("index") will be the method of that controller that is called. 38 |

39 | 40 | 46 |
47 | 48 | 49 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/EmbeddedFile.php: -------------------------------------------------------------------------------- 1 | createDependenciesFor('mime.embeddedfile') 35 | ); 36 | 37 | $this->setBody($data); 38 | $this->setFilename($filename); 39 | if ($contentType) 40 | { 41 | $this->setContentType($contentType); 42 | } 43 | } 44 | 45 | /** 46 | * Create a new EmbeddedFile. 47 | * @param string|Swift_OutputByteStream $data 48 | * @param string $filename 49 | * @param string $contentType 50 | * @return Swift_Mime_EmbeddedFile 51 | */ 52 | public static function newInstance($data = null, $filename = null, 53 | $contentType = null) 54 | { 55 | return new self($data, $filename, $contentType); 56 | } 57 | 58 | /** 59 | * Create a new EmbeddedFile from a filesystem path. 60 | * @param string $path 61 | * @return Swift_Mime_EmbeddedFile 62 | */ 63 | public static function fromPath($path) 64 | { 65 | return self::newInstance()->setFile( 66 | new Swift_ByteStream_FileByteStream($path) 67 | ); 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Plugins/ImpersonatePlugin.php: -------------------------------------------------------------------------------- 1 | _sender = $sender; 34 | } 35 | 36 | /** 37 | * Invoked immediately before the Message is sent. 38 | * 39 | * @param Swift_Events_SendEvent $evt 40 | */ 41 | public function beforeSendPerformed(Swift_Events_SendEvent $evt) { 42 | $message = $evt->getMessage(); 43 | $headers = $message->getHeaders(); 44 | 45 | // save current recipients 46 | $headers->addPathHeader('X-Swift-Return-Path', $message->getReturnPath()); 47 | 48 | // replace them with the one to send to 49 | $message->setReturnPath($this->_sender); 50 | } 51 | 52 | /** 53 | * Invoked immediately after the Message is sent. 54 | * 55 | * @param Swift_Events_SendEvent $evt 56 | */ 57 | public function sendPerformed(Swift_Events_SendEvent $evt) { 58 | $message = $evt->getMessage(); 59 | 60 | // restore original headers 61 | $headers = $message->getHeaders(); 62 | 63 | if ($headers->has('X-Swift-Return-Path')) { 64 | $message->setReturnPath($headers->get('X-Swift-Return-Path')->getAddress()); 65 | $headers->removeAll('X-Swift-Return-Path'); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /vendor/decoda/config.php: -------------------------------------------------------------------------------- 1 | createDependenciesFor('mime.attachment') 35 | ); 36 | 37 | $this->setBody($data); 38 | $this->setFilename($filename); 39 | if ($contentType) 40 | { 41 | $this->setContentType($contentType); 42 | } 43 | } 44 | 45 | /** 46 | * Create a new Attachment. 47 | * @param string|Swift_OutputByteStream $data 48 | * @param string $filename 49 | * @param string $contentType 50 | * @return Swift_Mime_Attachment 51 | */ 52 | public static function newInstance($data = null, $filename = null, 53 | $contentType = null) 54 | { 55 | return new self($data, $filename, $contentType); 56 | } 57 | 58 | /** 59 | * Create a new Attachment from a filesystem path. 60 | * @param string $path 61 | * @param string $contentType optional 62 | * @return Swift_Mime_Attachment 63 | */ 64 | public static function fromPath($path, $contentType = null) 65 | { 66 | return self::newInstance()->setFile( 67 | new Swift_ByteStream_FileByteStream($path), 68 | $contentType 69 | ); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /docs/assets/css/main.css: -------------------------------------------------------------------------------- 1 | .row { 2 | margin-bottom: 30px; 3 | } 4 | .after-topbar { 5 | margin-top: 60px; 6 | } 7 | pre.cli { 8 | background-color: #121212; 9 | color: #CCCCCC; 10 | } 11 | 12 | table { 13 | margin-bottom: 1.5em; 14 | } 15 | 16 | table.method { 17 | border: 3px solid #CCC; 18 | width: 100%; 19 | } 20 | 21 | table.method td, 22 | table.method th { 23 | border-collapse: collapse; 24 | font-size: 85%; 25 | border: 1px solid #CCC; 26 | } 27 | 28 | table.method td, 29 | table.method th { 30 | padding: 8px; 31 | } 32 | 33 | table.method td { 34 | background-color: #FFF; 35 | } 36 | 37 | table.method tbody th { 38 | text-align: left; 39 | background-color: #f8f8f8; 40 | } 41 | 42 | table.method td pre, 43 | table.method td code { 44 | margin: 0px; 45 | padding: 0px; 46 | border: 0px; 47 | } 48 | 49 | table.method td pre { 50 | padding: 9px; 51 | } 52 | 53 | table.config { 54 | border: 3px solid #CCC; 55 | width: 100%; 56 | } 57 | 58 | table.config td, 59 | table.config th { 60 | border-collapse: collapse; 61 | font-size: 85%; 62 | border: 1px solid #CCC; 63 | } 64 | 65 | table.config td, 66 | table.config th { 67 | padding: 8px; 68 | } 69 | 70 | table.config td { 71 | background-color: #FFF; 72 | } 73 | 74 | table.config tbody th { 75 | text-align: left; 76 | background-color: #f8f8f8; 77 | } 78 | 79 | table.config td pre, 80 | table.config td code { 81 | margin: 0px; 82 | padding: 0px; 83 | border: 0px; 84 | } 85 | 86 | table tr.header th { 87 | background-color: #555; 88 | color: #FFF; 89 | } 90 | table .header:after { 91 | display: none; 92 | } 93 | 94 | table.parameters { 95 | margin: -5px; 96 | } 97 | 98 | table.valign th, 99 | table.valign td { 100 | vertical-align: middle; 101 | } 102 | 103 | th.description { 104 | width: 100%; 105 | } 106 | 107 | th.legend { 108 | width: 125px; 109 | } 110 | 111 | table th.small, 112 | table td.small { 113 | width: 100px; 114 | white-space: nowrap; 115 | } 116 | 117 | table table { 118 | font-size: 110%; 119 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Mime/HeaderFactory.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Input Class — Hybrid for FuelPHP Documentation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 |
23 |
24 | 28 |
29 |
30 | 31 |
32 | 33 | 36 | 37 |

38 | The input class allows you to access HTTP parameters, load server variables and user agent details. 39 |

40 | 41 |

Extends

42 | 43 |

44 | Input class extends Fuel\Core\Input. 45 |

46 | 47 |
48 |

49 | Additional methods in \Hybrid\Input allow to Fuel to process "HMVC + RESTful Request" using \Hybrid\Request. 50 |

51 |
52 | 53 | 59 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/CharacterReader/UsAsciiReader.php: -------------------------------------------------------------------------------- 1 | "\x07F") 35 | { // Invalid char 36 | $currentMap[$i+$startOffset]=$string[$i]; 37 | } 38 | } 39 | return $strlen; 40 | } 41 | 42 | /** 43 | * Returns mapType 44 | * @int mapType 45 | */ 46 | public function getMapType() 47 | { 48 | return self::MAP_TYPE_INVALID; 49 | } 50 | 51 | /** 52 | * Returns an integer which specifies how many more bytes to read. 53 | * A positive integer indicates the number of more bytes to fetch before invoking 54 | * this method again. 55 | * A value of zero means this is already a valid character. 56 | * A value of -1 means this cannot possibly be a valid character. 57 | * @param string $bytes 58 | * @return int 59 | */ 60 | public function validateByteSequence($bytes, $size) 61 | { 62 | $byte = reset($bytes); 63 | if (1 == count($bytes) && $byte >= 0x00 && $byte <= 0x7F) 64 | { 65 | return 0; 66 | } 67 | else 68 | { 69 | return -1; 70 | } 71 | } 72 | 73 | /** 74 | * Returns the number of bytes which should be read to start each character. 75 | * @return int 76 | */ 77 | public function getInitialByteSize() 78 | { 79 | return 1; 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /classes/parser.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | 31 | class Parser 32 | { 33 | /** 34 | * Cache text instance so we can reuse it on multiple request eventhough 35 | * it's almost impossible to happen 36 | * 37 | * @static 38 | * @access protected 39 | * @var array 40 | */ 41 | protected static $instances = array(); 42 | 43 | /** 44 | * Initiate a new Parser instance 45 | * 46 | * @static 47 | * @access public 48 | * @return object 49 | * @throws \FuelException 50 | */ 51 | public static function __callStatic($method, array $arguments) 52 | { 53 | if ( ! in_array($method, array('factory', 'forge', 'instance', 'make'))) 54 | { 55 | throw new FuelException(__CLASS__.'::'.$method.'() does not exist.'); 56 | } 57 | 58 | $name = empty($arguments) ? null : $arguments[0]; 59 | $name = $name ?: ''; 60 | $name = strtolower($name); 61 | 62 | if ( ! isset(static::$instances[$name])) 63 | { 64 | $driver = "\Hybrid\Parser_".ucfirst($name); 65 | 66 | // instance has yet to be initiated 67 | if (class_exists($driver)) 68 | { 69 | static::$instances[$name] = new $driver(); 70 | } 71 | else 72 | { 73 | throw new FuelException("Requested {$driver} does not exist."); 74 | } 75 | } 76 | 77 | return static::$instances[$name]; 78 | } 79 | 80 | /** 81 | * Hybrid\Parser doesn't support a construct method 82 | * 83 | * @access protected 84 | */ 85 | protected function __construct() {} 86 | 87 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php: -------------------------------------------------------------------------------- 1 | _safeMap=array(); 34 | foreach (array_merge( 35 | range(0x61, 0x7A), range(0x41, 0x5A), 36 | range(0x30, 0x39), array(0x20, 0x21, 0x2A, 0x2B, 0x2D, 0x2F) 37 | ) as $byte) 38 | { 39 | $this->_safeMap[$byte] = chr($byte); 40 | } 41 | } 42 | 43 | /** 44 | * Get the name of this encoding scheme. 45 | * Returns the string 'Q'. 46 | * @return string 47 | */ 48 | public function getName() 49 | { 50 | return 'Q'; 51 | } 52 | 53 | /** 54 | * Takes an unencoded string and produces a Q encoded string from it. 55 | * @param string $string to encode 56 | * @param int $firstLineOffset, optional 57 | * @param int $maxLineLength, optional, 0 indicates the default of 76 chars 58 | * @return string 59 | */ 60 | public function encodeString($string, $firstLineOffset = 0, 61 | $maxLineLength = 0) 62 | { 63 | return str_replace(array(' ', '=20', "=\r\n"), array('_', '_', "\r\n"), 64 | parent::encodeString($string, $firstLineOffset, $maxLineLength) 65 | ); 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /classes/controller/core.php: -------------------------------------------------------------------------------- 1 | 30 | */ 31 | 32 | abstract class Controller_Core extends \Fuel\Core\Controller 33 | { 34 | /** 35 | * Run ACL check and redirect user automatically if user doesn't have the privilege 36 | * 37 | * @final 38 | * @access protected 39 | * @param mixed $resource 40 | * @param string $type 41 | * @param string $name 42 | * @throws HttpNotFoundException 43 | */ 44 | final protected function acl($resource, $type = null, $name = null) 45 | { 46 | $acl = Acl::make($name); 47 | $status = $acl->access_status($resource, $type); 48 | 49 | switch ($status) 50 | { 51 | case 401 : 52 | $acl->unauthorized($resource, false); 53 | exit(); 54 | break; 55 | } 56 | } 57 | 58 | /** 59 | * This method will be called after we route to the destinated method 60 | * 61 | * @access public 62 | * @return void 63 | */ 64 | public function before() 65 | { 66 | $this->language = Factory::get_language(); 67 | $this->user = Auth::make('user')->get(); 68 | 69 | Event::trigger('controller_before'); 70 | 71 | return parent::before(); 72 | } 73 | 74 | /** 75 | * This method will be called after we route to the destinated method 76 | * 77 | * @access public 78 | * @param mixed $response 79 | * @return Response 80 | */ 81 | public function after($response) 82 | { 83 | Event::trigger('controller_after'); 84 | 85 | return parent::after($response); 86 | } 87 | 88 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hybrid 2 | A set of class that extends the functionality of FuelPHP without affecting the standard workflow when the application doesn't actually utilize Hybrid feature. 3 | 4 | ## Key Features 5 | 6 | * ACL class support unlimited roles and resources, configurable using either `deny`, `view`, `create`, `edit`, `delete` or `all` access type. 7 | * Auth class support normal user authentication or authentication using OAuth, OAuth2 or OpenID without any hassle, code inspired by [NinjAuth Package](https://github.com/happyninjas/fuel-ninjauth). 8 | * 6 predefined Controller class for you to choose from, you can choose from either a Quick and Dirty, Template, Restful or Hybrid (Template + Restful) support. 9 | * Chart collection class using [Google Visualization Library](http://code.google.com/apis/chart/). 10 | * Pagination are now easier than ever, you can choose the default URI segment, querystring or custom route with a simple configuration, the code will handle the rest. 11 | * Request class support Restful + HMVC structure, a cool way to avoid use of cURL in your FuelPHP app. 12 | * Parser class support text filtering to either Markdown, Textile or BBCode. 13 | * Swiftmail class a good alternative for SwiftMailer lover, restructure to cope with FuelPHP coding standard. 14 | * Template class give you the option to follow **MVC** or move **V** into a full theme-like experience inside your `public` folder complete with `assets` subfolder (if you choose to). 15 | * `oil refine autho` give you room to customize your application migration structure, have some fields not available in the default list, just add it up after you run `oil refine autho --install`. 16 | 17 | ## Other Features 18 | 19 | * Curl class 20 | * Currency class 21 | * Tabs class 22 | 23 | ## Contributors 24 | 25 | * Mior Muhammad Zaki 26 | * Arif Azraai 27 | * Ignacio Muñoz Fernandez 28 | 29 | ## Documentation 30 | 31 | Hybrid for FuelPHP documentation is available at and included on each download archive. 32 | 33 | * [Bug and Feature Request](https://github.com/codenitive/fuel-hybrid/issues) 34 | * Roadmaps: 35 | * [Release 1.1.1](http://roadma.ps/1FS) 36 | * [Release 1.1.2](http://roadma.ps/1IH) 37 | * IRC Discussion: join #fuel-hybrid on irc.freenode.net -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/InputByteStream.php: -------------------------------------------------------------------------------- 1 | = $maxLineLength || 76 < $maxLineLength) 35 | { 36 | $maxLineLength = 76; 37 | } 38 | 39 | $remainder = 0; 40 | 41 | while (false !== $bytes = $os->read(8190)) 42 | { 43 | $encoded = base64_encode($bytes); 44 | $encodedTransformed = ''; 45 | $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset; 46 | 47 | while ($thisMaxLineLength < strlen($encoded)) 48 | { 49 | $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength) . "\r\n"; 50 | $firstLineOffset = 0; 51 | $encoded = substr($encoded, $thisMaxLineLength); 52 | $thisMaxLineLength = $maxLineLength; 53 | $remainder = 0; 54 | } 55 | 56 | if (0 < $remainingLength = strlen($encoded)) 57 | { 58 | $remainder += $remainingLength; 59 | $encodedTransformed .= $encoded; 60 | $encoded = null; 61 | } 62 | 63 | $is->write($encodedTransformed); 64 | } 65 | } 66 | 67 | /** 68 | * Get the name of this encoding scheme. 69 | * Returns the string 'base64'. 70 | * @return string 71 | */ 72 | public function getName() 73 | { 74 | return 'base64'; 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Transport/NullTransport.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * For the full copyright and license information, please view the LICENSE 8 | * file that was distributed with this source code. 9 | */ 10 | 11 | /** 12 | * Pretends messages have been sent, but just ignores them. 13 | * @package Swift 14 | * @author Fabien Potencier 15 | */ 16 | class Swift_Transport_NullTransport implements Swift_Transport 17 | { 18 | /** The event dispatcher from the plugin API */ 19 | private $_eventDispatcher; 20 | 21 | /** 22 | * Constructor. 23 | */ 24 | public function __construct(Swift_Events_EventDispatcher $eventDispatcher) 25 | { 26 | $this->_eventDispatcher = $eventDispatcher; 27 | } 28 | 29 | /** 30 | * Tests if this Transport mechanism has started. 31 | * 32 | * @return boolean 33 | */ 34 | public function isStarted() 35 | { 36 | return true; 37 | } 38 | 39 | /** 40 | * Starts this Transport mechanism. 41 | */ 42 | public function start() 43 | { 44 | } 45 | 46 | /** 47 | * Stops this Transport mechanism. 48 | */ 49 | public function stop() 50 | { 51 | } 52 | 53 | /** 54 | * Sends the given message. 55 | * 56 | * @param Swift_Mime_Message $message 57 | * @param string[] &$failedRecipients to collect failures by-reference 58 | * 59 | * @return int The number of sent emails 60 | */ 61 | public function send(Swift_Mime_Message $message, &$failedRecipients = null) 62 | { 63 | if ($evt = $this->_eventDispatcher->createSendEvent($this, $message)) 64 | { 65 | $this->_eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); 66 | if ($evt->bubbleCancelled()) 67 | { 68 | return 0; 69 | } 70 | } 71 | 72 | if ($evt) 73 | { 74 | $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); 75 | $this->_eventDispatcher->dispatchEvent($evt, 'sendPerformed'); 76 | } 77 | 78 | return 0; 79 | } 80 | 81 | /** 82 | * Register a plugin. 83 | * 84 | * @param Swift_Events_EventListener $plugin 85 | */ 86 | public function registerPlugin(Swift_Events_EventListener $plugin) 87 | { 88 | $this->_eventDispatcher->bindEventListener($plugin); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /classes/view.php: -------------------------------------------------------------------------------- 1 | 31 | */ 32 | 33 | class View extends \Fuel\Core\View 34 | { 35 | /** 36 | * @static 37 | * @access protected 38 | * @var string 39 | */ 40 | protected static $file_path = ''; 41 | 42 | /** 43 | * Set the global path. 44 | * 45 | * example: 46 | * 47 | * \Hybrid\View::set_path($path); 48 | * 49 | * 50 | * @static 51 | * @access public 52 | * @param string $path 53 | * @return void 54 | */ 55 | public static function set_path($path) 56 | { 57 | static::$file_path = $path; 58 | } 59 | 60 | /** 61 | * Sets the view filename. 62 | * 63 | * example: 64 | * 65 | * $view->set_filename($file); 66 | * 67 | * 68 | * @static 69 | * @access public 70 | * @param string $file a string of view filename 71 | * @return self 72 | * @throws FuelException 73 | */ 74 | public function set_filename($file) 75 | { 76 | // locate the view file 77 | switch (true) 78 | { 79 | case ($path = Finder::search('views', static::$file_path.$file.'.'.$this->extension)) : break; 80 | default : 81 | // set find_file's one-time-only search paths 82 | Finder::instance()->flash($this->request_paths); 83 | 84 | if (($path = Finder::search('views', $file, '.'.$this->extension, false, false)) === false) 85 | { 86 | throw new FuelException(__METHOD__.': The requested view could not be found: '.Fuel::clean_path($file)); 87 | } 88 | 89 | } 90 | 91 | // Store the file path locally 92 | $this->file_name = $path; 93 | 94 | return $this; 95 | } 96 | 97 | } -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Plugins/ReporterPlugin.php: -------------------------------------------------------------------------------- 1 | _reporter = $reporter; 36 | } 37 | 38 | /** 39 | * Not used. 40 | */ 41 | public function beforeSendPerformed(Swift_Events_SendEvent $evt) 42 | { 43 | } 44 | 45 | /** 46 | * Invoked immediately after the Message is sent. 47 | * @param Swift_Events_SendEvent $evt 48 | */ 49 | public function sendPerformed(Swift_Events_SendEvent $evt) 50 | { 51 | $message = $evt->getMessage(); 52 | $failures = array_flip($evt->getFailedRecipients()); 53 | foreach ((array) $message->getTo() as $address => $null) 54 | { 55 | $this->_reporter->notify( 56 | $message, $address, (array_key_exists($address, $failures) 57 | ? Swift_Plugins_Reporter::RESULT_FAIL 58 | : Swift_Plugins_Reporter::RESULT_PASS) 59 | ); 60 | } 61 | foreach ((array) $message->getCc() as $address => $null) 62 | { 63 | $this->_reporter->notify( 64 | $message, $address, (array_key_exists($address, $failures) 65 | ? Swift_Plugins_Reporter::RESULT_FAIL 66 | : Swift_Plugins_Reporter::RESULT_PASS) 67 | ); 68 | } 69 | foreach ((array) $message->getBcc() as $address => $null) 70 | { 71 | $this->_reporter->notify( 72 | $message, $address, (array_key_exists($address, $failures) 73 | ? Swift_Plugins_Reporter::RESULT_FAIL 74 | : Swift_Plugins_Reporter::RESULT_PASS) 75 | ); 76 | } 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Message.php: -------------------------------------------------------------------------------- 1 | createDependenciesFor('mime.message') 36 | ); 37 | 38 | if (!isset($charset)) 39 | { 40 | $charset = Swift_DependencyContainer::getInstance() 41 | ->lookup('properties.charset'); 42 | } 43 | $this->setSubject($subject); 44 | $this->setBody($body); 45 | $this->setCharset($charset); 46 | if ($contentType) 47 | { 48 | $this->setContentType($contentType); 49 | } 50 | } 51 | 52 | /** 53 | * Create a new Message. 54 | * @param string $subject 55 | * @param string $body 56 | * @param string $contentType 57 | * @param string $charset 58 | * @return Swift_Mime_Message 59 | */ 60 | public static function newInstance($subject = null, $body = null, 61 | $contentType = null, $charset = null) 62 | { 63 | return new self($subject, $body, $contentType, $charset); 64 | } 65 | 66 | /** 67 | * Add a MimePart to this Message. 68 | * @param string|Swift_OutputByteStream $body 69 | * @param string $contentType 70 | * @param string $charset 71 | */ 72 | public function addPart($body, $contentType = null, $charset = null) 73 | { 74 | return $this->attach(Swift_MimePart::newInstance( 75 | $body, $contentType, $charset 76 | )); 77 | } 78 | 79 | public function __wakeup() 80 | { 81 | Swift_DependencyContainer::getInstance()->createDependenciesFor('mime.message'); 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php: -------------------------------------------------------------------------------- 1 | executeCommand("AUTH CRAM-MD5\r\n", array(334)); 44 | $challenge = base64_decode(substr($challenge, 4)); 45 | $message = base64_encode( 46 | $username . ' ' . $this->_getResponse($password, $challenge) 47 | ); 48 | $agent->executeCommand(sprintf("%s\r\n", $message), array(235)); 49 | return true; 50 | } 51 | catch (Swift_TransportException $e) 52 | { 53 | $agent->executeCommand("RSET\r\n", array(250)); 54 | return false; 55 | } 56 | } 57 | 58 | /** 59 | * Generate a CRAM-MD5 response from a server challenge. 60 | * @param string $secret 61 | * @param string $challenge 62 | * @return string 63 | */ 64 | private function _getResponse($secret, $challenge) 65 | { 66 | if (strlen($secret) > 64) 67 | { 68 | $secret = pack('H32', md5($secret)); 69 | } 70 | 71 | if (strlen($secret) < 64) 72 | { 73 | $secret = str_pad($secret, 64, chr(0)); 74 | } 75 | 76 | $k_ipad = substr($secret, 0, 64) ^ str_repeat(chr(0x36), 64); 77 | $k_opad = substr($secret, 0, 64) ^ str_repeat(chr(0x5C), 64); 78 | 79 | $inner = pack('H32', md5($k_ipad . $challenge)); 80 | $digest = md5($k_opad . $inner); 81 | 82 | return $digest; 83 | } 84 | 85 | } 86 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Preferences.php: -------------------------------------------------------------------------------- 1 | register('properties.charset')->asValue($charset); 48 | return $this; 49 | } 50 | 51 | /** 52 | * Set the directory where temporary files can be saved. 53 | * @param string $dir 54 | * @return Swift_Preferences 55 | */ 56 | public function setTempDir($dir) 57 | { 58 | Swift_DependencyContainer::getInstance() 59 | ->register('tempdir')->asValue($dir); 60 | return $this; 61 | } 62 | 63 | /** 64 | * Set the type of cache to use (i.e. "disk" or "array"). 65 | * @param string $type 66 | * @return Swift_Preferences 67 | */ 68 | public function setCacheType($type) 69 | { 70 | Swift_DependencyContainer::getInstance() 71 | ->register('cache')->asAliasOf(sprintf('cache.%s', $type)); 72 | return $this; 73 | } 74 | 75 | /** 76 | * Add the 77 | * @param boolean $dotEscape 78 | */ 79 | public function setQPDotEscape($dotEscape) 80 | { 81 | $dotEscape=!empty($dotEscape); 82 | Swift_DependencyContainer::getInstance() 83 | -> register('mime.qpcontentencoder') 84 | -> asNewInstanceOf('Swift_Mime_ContentEncoder_QpContentEncoder') 85 | -> withDependencies(array('mime.charstream', 'mime.bytecanonicalizer')) 86 | -> addConstructorValue($dotEscape); 87 | return $this; 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /vendor/swift/classes/Swift/Transport/EsmtpHandler.php: -------------------------------------------------------------------------------- 1 | . 41 | * @return string[] 42 | */ 43 | public function getMailParams(); 44 | 45 | /** 46 | * Get params which are appended to RCPT TO:<>. 47 | * @return string[] 48 | */ 49 | public function getRcptParams(); 50 | 51 | /** 52 | * Runs when a command is due to be sent. 53 | * @param Swift_Transport_SmtpAgent $agent to read/write 54 | * @param string $command to send 55 | * @param int[] $codes expected in response 56 | * @param string[] &$failedRecipients 57 | * @param boolean &$stop to be set true if the command is now sent 58 | */ 59 | public function onCommand(Swift_Transport_SmtpAgent $agent, 60 | $command, $codes = array(), &$failedRecipients = null, &$stop = false); 61 | 62 | /** 63 | * Returns +1, -1 or 0 according to the rules for usort(). 64 | * This method is called to ensure extensions can be execute in an appropriate order. 65 | * @param string $esmtpKeyword to compare with 66 | * @return int 67 | */ 68 | public function getPriorityOver($esmtpKeyword); 69 | 70 | /** 71 | * Returns an array of method names which are exposed to the Esmtp class. 72 | * @return string[] 73 | */ 74 | public function exposeMixinMethods(); 75 | 76 | /** 77 | * Tells this handler to clear any buffers and reset its state. 78 | */ 79 | public function resetState(); 80 | 81 | } 82 | --------------------------------------------------------------------------------