Skip to content

Instantly share code, notes, and snippets.

@drkibitz
Last active December 20, 2015 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drkibitz/6046241 to your computer and use it in GitHub Desktop.
Save drkibitz/6046241 to your computer and use it in GitHub Desktop.
Tonic MetadataCacheInclude Example
<?php
/**
* This is example output for the Tyrell example.
* It has been reformatted for readability.
*/
return array (
'Tyrell\\Everything' => array (
'class' => '\\Tyrell\\Everything',
'namespace' => array ('Tyrell'),
'filename' => '/path/to/my-tonic-app/src/Tyrell/Everything.php',
'priority' => array (1),
'uri' => array (
array ('/tonic/web/everything'),
array (
'/tonic/web/everything/(.*)',
0
),
),
'methods' => array (
'doEverything' => array (
'method' => array (
array ('GET')
)
)
)
),
'Tyrell\\Hello' => array (
'class' => '\\Tyrell\\Hello',
'namespace' => array ('Tyrell'),
'filename' => '/path/to/my-tonic-app/src/Tyrell/Hello.php',
'priority' => array (1),
'uri' => array (
array ('/tonic/web/hello'),
array (
'/tonic/web/hello/([^/]+)',
'name'
)
),
'methods' => array (
'sayHello' => array (
'method' => array (
array ('GET')
)
),
'sayHelloInFrench' => array (
'method' => array (
array ('GET')
),
'lang' => array (
array ('fr')
)
),
'replicants' => array (
'method' => array (
array ('GET')
),
'priority' => array (
array ('2')
),
'only' => array (
array ('deckard')
)
),
'iveSeenThings' => array (
'method' => array (
array ('GET')
),
'priority' => array (
array ('2')
),
'only' => array (
array ('roy')
)
),
'sayHelloComputer' => array (
'method' => array (
array ('GET')
),
'provides' => array (
array ('application/json')
),
'json' => array (
array ()
)
),
'feedTheComputer' => array (
'method' => array (
array ('POST')
),
'accepts' => array (
array ('application/json')
),
'provides' => array (
array ('application/json')
),
'json' => array (
array ()
)
)
)
),
'Tyrell\\Secret' => array (
'class' => '\\Tyrell\\Secret',
'namespace' => array ('Tyrell'),
'filename' => '/path/to/my-tonic-app/src/Tyrell/Secret.php',
'priority' => array (1),
'uri' => array (
array ('/tonic/web/secret')
),
'methods' => array (
'mySecret' => array (
'method' => array (
array ('GET')
),
'secure' => array (
array (
'aUser',
'aPassword'
)
)
)
)
),
'Tyrell\\TotallySecureResource' => array (
'class' => '\\Tyrell\\TotallySecureResource',
'namespace' => array ('Tyrell'),
'filename' => '/path/to/my-tonic-app/src/Tyrell/Secret.php',
'priority' => array (1),
'uri' => array (
array ('/tonic/web/secret2')
),
'methods' => array (
'secret' => array (
'method' => array (
array ('GET')
)
)
)
),
'Tyrell\\Welcome' => array (
'class' => '\\Tyrell\\Welcome',
'namespace' => array (0 => 'Tyrell'),
'filename' => '/path/to/my-tonic-app/src/Tyrell/Welcome.php',
'priority' => array (1),
'uri' => array (
array ('/tonic/web/')
),
'methods' => array (
'welcomeMessage' => array (
'method' => array (
array ('GET')
)
)
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment