[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 namespace RESTful; 4 5 class Registry 6 { 7 protected $_resources = array(); 8 9 public function add($resource) 10 { 11 array_push($this->_resources, $resource); 12 } 13 14 public function match($uri) 15 { 16 foreach ($this->_resources as $resource) { 17 $spec = $resource::getURISpec(); 18 $result = $spec->match($uri); 19 if ($result == null) { 20 continue; 21 } 22 $result['class'] = $resource; 23 24 return $result; 25 } 26 27 return null; 28 } 29 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |