This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via d6d1e71b5d481d80ecb3de3f690a78f27c121cdd (commit)
from f98f38f5b9ba1e568ffc727a27d5b8b41837815e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d6d1e71b5d481d80ecb3de3f690a78f27c121cdd
Author: Ivan1986 <iva...@li...>
Date: Fri May 14 10:13:14 2010 +0400
Теперь Url можно передавать блоку
diff --git a/QFW/QuickFW/Router.php b/QFW/QuickFW/Router.php
index 2bbe92d..70b946a 100644
--- a/QFW/QuickFW/Router.php
+++ b/QFW/QuickFW/Router.php
@@ -137,6 +137,9 @@ class QuickFW_Router
//Сохраняем старый путь шаблонов
$scriptPath = QFW::$view->getScriptPath();
+ if ($Uri instanceof Url)
+ $Uri = $Uri->intern();
+
//два варианта записи вызова
// module.controller.action(p1,p2,p3,...)
if (preg_match('|^(?:(\w*?)\.)?(\w*?)(?:\.(\w*))?(?:\((.*)\))?$|',$Uri,$patt))
diff --git a/QFW/QuickFW/Url.php b/QFW/QuickFW/Url.php
index 67c4d3f..5a6cd2d 100644
--- a/QFW/QuickFW/Url.php
+++ b/QFW/QuickFW/Url.php
@@ -33,7 +33,7 @@ class Url
/**
* Урл, относительно модуля
*
- * @param string|self $url url
+ * @param string|self $CA url
* @param string|array $get параметры
* @param string $ancor якорь
* @return self адрес на сайте
@@ -47,7 +47,7 @@ class Url
/**
* Урл, относительно контроллера
*
- * @param string|self $url url
+ * @param string|self $action url
* @param string|array $get параметры
* @param string $ancor якорь
* @return self адрес на сайте
@@ -63,18 +63,18 @@ class Url
/**
* Урл, относительно экшена
*
- * @param string|self $url url
+ * @param string|self $params url
* @param string|array $get параметры
* @param string $ancor якорь
* @return self адрес на сайте
*/
- public static function A($url, $get='', $ancor='')
+ public static function A($params='', $get='', $ancor='')
{
- return new self($url, $get, $ancor, QFW::$router->cModule.
+ return new self($params, $get, $ancor, QFW::$router->cModule.
QuickFW_Router::PATH_SEPARATOR.
QFW::$router->cController.
QuickFW_Router::PATH_SEPARATOR.
- QFW::$router->cAction);
+ QFW::$router->cAction.QuickFW_Router::PATH_SEPARATOR);
}
/**
@@ -140,6 +140,17 @@ class Url
($this->ancor ? '#' . $this->ancor : '');
}
+
+ /**
+ * Внутренний адрес - для блока
+ *
+ * @internal
+ * @return string внутренний адрес
+ */
+ public function intern()
+ {
+ return $this->u;
+ }
}
-----------------------------------------------------------------------
Summary of changes:
QFW/QuickFW/Router.php | 3 +++
QFW/QuickFW/Url.php | 23 +++++++++++++++++------
2 files changed, 20 insertions(+), 6 deletions(-)
hooks/post-receive
--
quickfw
|