Router is a static HTTP router mapping indexed HTTP patterns to indexed request outputs.
patterns inport is an addressable parameter accepting patterns the router handles, e.g.:
'get /hello' -> PATTERN[0] Router
| <?php | |
| defined('COT_CODE') or die('Wrong URL.'); | |
| (function_exists('version_compare') && version_compare(PHP_VERSION, '5.3.0', '>=')) or die('PHP version 5.3 or higher is required.'); | |
| require_once cot_incfile('forms'); | |
| require_once cot_incfile('orm'); | |
| /** |
| <ul> | |
| <?php | |
| /** | |
| * Finds all PHP files containing trailing or leading spaces | |
| * before or after PHP open/close tags. | |
| */ | |
| foreach (rglob('**/*.php') as $file) | |
| { | |
| if (preg_match('`\A\s+<\?`m', file_get_contents($file))) |
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "log" | |
| "os" | |
| "runtime" | |
| ) |
| package chanperf | |
| import ( | |
| "testing" | |
| ) | |
| func BenchmarkInt(b *testing.B) { | |
| fin := make(chan bool) | |
| comm := make(chan int) | |
| go func() { |
| $hybrid = new HybridAuth(); | |
| // Odnoklassniki bypass friend selection and just post status | |
| try | |
| { | |
| $fullname = "{$hybrid->profile->firstName} {$hybrid->profile->lastName}"; | |
| $hybrid->adapter->setUserStatus($L['quest_wall_message'] . $fullname. ', ' . "http://example.com/quest?guess={$usr['id']}"); | |
| } | |
| catch (Exception $e) { /* Handle errors here */ } |
| <?php | |
| /*! | |
| * HybridAuth | |
| * http://hybridauth.sourceforge.net | http://github.com/hybridauth/hybridauth | |
| * (c) 2009-2012, HybridAuth authors | http://hybridauth.sourceforge.net/licenses.html | |
| */ | |
| /** | |
| * Hybrid_Providers_Odnoklassniki provider adapter based on OAuth2 protocol | |
| * |
| Version = 11 | |
| Booleans = {'caretLineVisible': True, 'preferFixed': 1, 'useSelFore': True} | |
| CommonStyles = {'attribute name': {'fore': 7872391}, | |
| 'attribute value': {'fore': 3100463}, | |
| 'bracebad': {'bold': True, 'fore': 3093212}, | |
| 'bracehighlight': {'fore': 3093212}, | |
| 'classes': {'fore': 35253}, | |
| 'comments': {'fore': 7695960, 'italic': True}, |
| noflo = require 'noflo' | |
| Canvas = require 'canvas' | |
| Image = Canvas.Image | |
| urlUtil = require 'url' | |
| request = require 'request' | |
| temporary = require 'temporary' | |
| fs = require 'fs' | |
| # @runtime noflo-nodejs | |
| # @name CreateImage |
| var noflo = require("noflo"); | |
| exports.getComponent = function() { | |
| var component = new noflo.Component; | |
| component.description = "Test"; | |
| component.inPorts.add('in', { | |
| datatype: 'all', | |
| addressable: true | |
| }); |