svn: /pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/ Main.php PackageRelease.php
| From: | Amir Mohammad Saied | Date: | Fri, 11 Dec 2009 18:29:12 +0000 |
| Subject: | svn: /pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/ Main.php PackageRelease.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-9102@lists.php.net to get a copy of this message | ||
amir Fri, 11 Dec 2009 18:29:12 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291998
Log:
A page for each release of a package
Changed paths:
U pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/Main.php
A pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/PackageRelease.php
Modified: pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/Main.php
===================================================================
--- pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/Main.php 2009-12-11 17:25:48
UTC (rev 291997)
+++ pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/Main.php 2009-12-11 18:29:12
UTC (rev 291998)
@@ -41,6 +41,7 @@
protected static $view_map = array('news' =>
'pear2\SimpleChannelFrontend\News',
'packages' =>
'pear2\SimpleChannelFrontend\PackageList',
'package' =>
'pear2\SimpleChannelFrontend\Package',
+ 'release' =>
'pear2\SimpleChannelFrontend\PackageRelease',
'categories' =>
'pear2\SimpleChannelFrontend\Categories',
'support' =>
'pear2\SimpleChannelFrontend\Support');
Added: pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/PackageRelease.php
===================================================================
--- pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/PackageRelease.php
(rev 0)
+++
pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/PackageRelease.php 2009-12-11
18:29:12 UTC (rev 291998)
@@ -0,0 +1,28 @@
+<?php
+namespace pear2\SimpleChannelFrontend;
+class PackageRelease
+{
+ public $_package;
+
+ function __construct($options = array())
+ {
+ $this->_package =
$options['frontend']::$channel->remotepackage[$options['package']];
+ try {
+ $this->_package->setRawVersion(
+ null, array('release' => $options['packageVersion'])
+ );
+ } catch (\Exception $e) {
+ throw new UnregisteredViewException($e->getMessage());
+ }
+ }
+
+ function __get($var)
+ {
+ return $this->_package->$var;
+ }
+
+ function __call($method, $args)
+ {
+ return call_user_func_array(array($this->_package, $method), $args);
+ }
+}