Tonic

A B C E F G H I J L M N O P R S U

A

accepts() - Method in class Tonic\Resource
Accepts condition mimetype must match request content type
after() - Method in class Tonic\Resource
Add a function to execute on the response after the resource method is called
Application() - Class in namespace Tonic
A Tonic application
autoload() - Method in class Tonic\Autoloader
Handles autoloading of classes
Autoloader() - Class in namespace Tonic
Autoload

B

before() - Method in class Tonic\Resource
Add a function to execute on the request before the resource method is called

C

cache() - Method in class Tonic\Resource
Set cache control header on response
clear() - Method in class Tonic\MetadataCacheAPC
clear() - Method in class Tonic\MetadataCacheFile
clear() - Method in class Tonic\MetadataCache
Clear the cache
ConditionException() - Exception in namespace Tonic
Exception to be thrown when a resource method condition fails
create() - Method in class Tonic\Response
Factory method to create a Response from a variety of inputs

E

Exception() - Class in namespace Tonic
Base exception class for Tonic exceptions
exec() - Method in class Tonic\Resource
Execute the resource, that is, find the correct resource method to call based upon the request and then call it.

F

feedTheComputer() - Method in class Tyrell\Hello
All HTTP methods are supported.

G

getOption() - Method in class Tonic\Request
Get an item from the given options array if it exists, otherwise fetch from HTTP header or return the given default
getResource() - Method in class Tonic\Application
Given the request data and the loaded resource metadata, pick the best matching resource to handle the request based on URI and priority.
getResourceMetadata() - Method in class Tonic\Application
Get the already loaded resource annotation metadata

H

Hello() - Class in namespace Tyrell
The obligitory Hello World example The @uri annotation routes requests that match that URL to this resource.

I

isCached() - Method in class Tonic\MetadataCacheAPC
Is there already cache file
isCached() - Method in class Tonic\MetadataCache
Is there already cache file
isCached() - Method in class Tonic\MetadataCacheFile
Is there already cache file
iveSeenThings() - Method in class Tyrell\Hello

J

json() - Method in class Tyrell\Hello
Condition method to turn output into JSON

L

lang() - Method in class Tonic\Resource
Lang condition language code must be in request accept lang array, returns a number based on the priority of the match.
load() - Method in class Tonic\MetadataCacheAPC
Load the resource metadata from disk
load() - Method in class Tonic\MetadataCacheFile
Load the resource metadata from disk
load() - Method in class Tonic\MetadataCache
Load the resource metadata from disk

M

MetadataCache() - Interface in namespace Tonic
Cache resource metadata between invocations
MetadataCacheAPC() - Class in namespace Tonic
Cache resource metadata between invocations This class writes the resource metadata to APC for reading in a later request.
MetadataCacheFile() - Class in namespace Tonic
Cache resource metadata between invocations This class serializes the resource metadata and writes it to disk for reading in a later request.
method() - Method in class Tonic\Resource
HTTP method condition must match request method
MethodNotAllowedException() - Exception in namespace Tonic
Base exception class for Tonic exceptions
mount() - Method in class Tonic\Application
Add a namespace to a specific URI-space
mySecret() - Method in class Tyrell\Secret

N

NotAcceptableException() - Exception in namespace Tonic
Base exception class for Tonic exceptions
NotFoundException() - Exception in namespace Tonic
Base exception class for Tonic exceptions

O

only() - Method in class Tyrell\Hello
Condition method for above methods.
output() - Method in class Tonic\Response
Output the response

P

priority() - Method in class Tonic\Resource
Higher priority method takes precident over other matches
provides() - Method in class Tonic\Resource
Provides condition mimetype must be in request accept array, returns a number based on the priority of the match.

R

replicants() - Method in class Tyrell\Hello
The @priority annotation makes this method take priority over the above method.
Request() - Class in namespace Tonic
Model a HTTP request
Resource() - Class in namespace Tonic
Model a HTTP resource
Response() - Class in namespace Tonic
Model a HTTP response
responseCode() - Method in class Tonic\Response
Get the HTTP response code of this response

S

save() - Method in class Tonic\MetadataCacheFile
Save resource metadata to disk
save() - Method in class Tonic\MetadataCacheAPC
Save resource metadata to disk
save() - Method in class Tonic\MetadataCache
Save resource metadata to disk
sayHello() - Method in class Tyrell\Hello
Use this method to handle GET HTTP requests.
sayHelloComputer() - Method in class Tyrell\Hello
The @provides annotation makes method only match requests that have a suitable accept header or URL extension (ie: /hello.json) and causes the response to automatically contain the correct content-type response header.
sayHelloInFrench() - Method in class Tyrell\Hello
Secret() - Class in namespace Tyrell
Simple HTTP authentication example.
secure() - Method in class Tyrell\Secret

U

UnauthorizedException() - Exception in namespace Tonic
Base exception class for Tonic exceptions
UnsupportedMediaTypeException() - Exception in namespace Tonic
Base exception class for Tonic exceptions
uri() - Method in class Tonic\Application
Get the URL for the given resource class

Tonic