Постфиксная запись типов вместо префиксной
This commit is contained in:
parent
04662a94df
commit
11370eecc9
33 changed files with 95 additions and 79 deletions
|
|
@ -10,7 +10,7 @@ class Page extends View
|
|||
{
|
||||
private $counter;
|
||||
public $text;
|
||||
public /*.SiteInterface.*/$site;
|
||||
public $site/*: SiteInterface*/;
|
||||
|
||||
function __construct($data, $site)
|
||||
{
|
||||
|
|
@ -55,7 +55,7 @@ class Page extends View
|
|||
|
||||
function replaceContent($match, $offset)
|
||||
{
|
||||
/*.Component.*/$component = $this->site->loadComponent($match);
|
||||
$component/*: Component*/ = $this->site->loadComponent($match);
|
||||
|
||||
$req = new HttpRequest();
|
||||
unset($req['active_page']);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class Pages
|
|||
* @param $onpage int количество элем на странице
|
||||
* @return string
|
||||
*/
|
||||
static function getLimit(/*.number.*/$page, /*.number.*/$onpage) {
|
||||
static function getLimit($page/*: number*/, $onpage/*: number*/) {
|
||||
if ($page <= 0) { $page = 1; }
|
||||
return "LIMIT $onpage OFFSET " . ($page - 1) * $onpage;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ class Top extends Composite {
|
|||
|
||||
$init = array();
|
||||
foreach($s->_section as $key => $item) {
|
||||
/*.View.*/$ss = $item;
|
||||
$ss/*: View*/ = $item;
|
||||
if ($ss->codeGenerator !== null) {
|
||||
// функцию которая вычисляет а не результат
|
||||
$part = call_user_func($ss->codeGenerator, $this, $key, $value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue