Page MenuHomestyx hydra

Registry.php
No OneTemporary

Registry.php

<?php
namespace RESTful;
class Registry
{
protected $_resources = array();
public function add($resource)
{
array_push($this->_resources, $resource);
}
public function match($uri)
{
foreach ($this->_resources as $resource) {
$spec = $resource::getURISpec();
$result = $spec->match($uri);
if ($result == null) {
continue;
}
$result['class'] = $resource;
return $result;
}
return null;
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Feb 4, 12:25 PM (20 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
661054
Default Alt Text
Registry.php (542 B)

Event Timeline