Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
- updated new PHP 5.3 namespace separator
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Oct 10, 2010
1 parent f141909 commit b5fb307
Show file tree
Hide file tree
Showing 30 changed files with 82 additions and 82 deletions.
6 changes: 3 additions & 3 deletions Akrabat.Forms/app/bootstrap.php
@@ -1,7 +1,7 @@
<?php

/*use Nette::Environment;*/
/*use Nette::Application::Route;*/
/*use Nette\Environment;*/
/*use Nette\Application\Route;*/


// Step 1: Load Nette Framework
Expand All @@ -13,7 +13,7 @@


// Step 2: Configure and setup application environment
// 2a) enable Nette::Debug for better exception and error visualisation
// 2a) enable Nette\Debug for better exception and error visualisation
Debug::enable(E_ALL | E_STRICT);

// 2b) load configuration from config.ini file
Expand Down
6 changes: 3 additions & 3 deletions Akrabat.Forms/app/models/Users.php
@@ -1,6 +1,6 @@
<?php

/*use Nette::Security::AuthenticationException;*/
/*use Nette\Security\AuthenticationException;*/


/**
Expand All @@ -14,7 +14,7 @@
* [real_name] VARCHAR(100) NOT NULL
* );
*/
class Users extends DibiTable implements /*Nette::Security::*/IAuthenticator
class Users extends DibiTable implements /*Nette\Security\*/IAuthenticator
{

/**
Expand All @@ -35,7 +35,7 @@ public function authenticate(array $credentials)
}

unset($row->password);
return new /*Nette::Security::*/Identity($row->username, array(), $row);
return new /*Nette\Security\*/Identity($row->username, array(), $row);
}

}
4 changes: 2 additions & 2 deletions Akrabat.Forms/app/presenters/AuthPresenter.php
@@ -1,7 +1,7 @@
<?php

/*use Nette::Environment;*/
/*use Nette::Security::AuthenticationException;*/
/*use Nette\Environment;*/
/*use Nette\Security\AuthenticationException;*/

require_once dirname(__FILE__) . '/BasePresenter.php';

Expand Down
4 changes: 2 additions & 2 deletions Akrabat.Forms/app/presenters/BasePresenter.php
@@ -1,12 +1,12 @@
<?php


abstract class BasePresenter extends /*Nette::Application::*/Presenter
abstract class BasePresenter extends /*Nette\Application\*/Presenter
{

protected function beforeRender()
{
$this->template->registerFilter(/*Nette::Templates::*/'TemplateFilters::curlyBrackets');
$this->template->registerFilter(/*Nette\Templates\*/'TemplateFilters::curlyBrackets');

$user = Environment::getUser();
$this->template->user = $user->isAuthenticated() ? $user->getIdentity() : NULL;
Expand Down
2 changes: 1 addition & 1 deletion Akrabat.Forms/app/presenters/DashboardPresenter.php
@@ -1,6 +1,6 @@
<?php

/*use Nette::Environment;*/
/*use Nette\Environment;*/

require_once dirname(__FILE__) . '/BasePresenter.php';

Expand Down
2 changes: 1 addition & 1 deletion Akrabat.Forms/readme.txt
@@ -1,7 +1,7 @@
Nette Framework example
-----------------------

Klasicky Zend Framework Tutorial prepsany pro Nette s vyuzit�m Nette::Forms.
Klasicky Zend Framework Tutorial prepsany pro Nette s vyuzit�m Nette\Forms.

Priklad demonstruje velmi dulezity rys Nette Frameworku: v ramci aplikace a to vcetne sablon
se nepouzivaji URL. Ty jsou zalezitosti routeru a mohou se kdykoliv menit. Cilem odkazu je vzdy
Expand Down
6 changes: 3 additions & 3 deletions Akrabat/app/bootstrap.php
@@ -1,7 +1,7 @@
<?php

/*use Nette::Environment;*/
/*use Nette::Application::Route;*/
/*use Nette\Environment;*/
/*use Nette\Application\Route;*/


// Step 1: Load Nette Framework
Expand All @@ -13,7 +13,7 @@


// Step 2: Configure and setup application environment
// 2a) enable Nette::Debug for better exception and error visualisation
// 2a) enable Nette\Debug for better exception and error visualisation
Debug::enable(E_ALL | E_STRICT);

// 2b) load configuration from config.ini file
Expand Down
6 changes: 3 additions & 3 deletions Akrabat/app/models/Users.php
@@ -1,6 +1,6 @@
<?php

/*use Nette::Security::AuthenticationException;*/
/*use Nette\Security\AuthenticationException;*/


/**
Expand All @@ -14,7 +14,7 @@
* [real_name] VARCHAR(100) NOT NULL
* );
*/
class Users extends DibiTable implements /*Nette::Security::*/IAuthenticator
class Users extends DibiTable implements /*Nette\Security\*/IAuthenticator
{

/**
Expand All @@ -35,7 +35,7 @@ public function authenticate(array $credentials)
}

unset($row->password);
return new /*Nette::Security::*/Identity($row->username, array(), $row);
return new /*Nette\Security\*/Identity($row->username, array(), $row);
}

}
4 changes: 2 additions & 2 deletions Akrabat/app/presenters/AuthPresenter.php
@@ -1,7 +1,7 @@
<?php

/*use Nette::Environment;*/
/*use Nette::Security::AuthenticationException;*/
/*use Nette\Environment;*/
/*use Nette\Security\AuthenticationException;*/

require_once dirname(__FILE__) . '/BasePresenter.php';

Expand Down
4 changes: 2 additions & 2 deletions Akrabat/app/presenters/BasePresenter.php
@@ -1,12 +1,12 @@
<?php


abstract class BasePresenter extends /*Nette::Application::*/Presenter
abstract class BasePresenter extends /*Nette\Application\*/Presenter
{

protected function beforeRender()
{
$this->template->registerFilter(/*Nette::Templates::*/'TemplateFilters::curlyBrackets');
$this->template->registerFilter(/*Nette\Templates\*/'TemplateFilters::curlyBrackets');

$user = Environment::getUser();
$this->template->user = $user->isAuthenticated() ? $user->getIdentity() : NULL;
Expand Down
2 changes: 1 addition & 1 deletion Akrabat/app/presenters/DashboardPresenter.php
@@ -1,6 +1,6 @@
<?php

/*use Nette::Environment;*/
/*use Nette\Environment;*/

require_once dirname(__FILE__) . '/BasePresenter.php';

Expand Down
2 changes: 1 addition & 1 deletion Akrabat/readme.txt
Expand Up @@ -2,7 +2,7 @@ Nette Framework example
-----------------------

Klasicky Zend Framework Tutorial prepsany pro Nette.
Pro jednoduchost (resp. slozitost :-) zde neni pouzito Nette::Forms.
Pro jednoduchost (resp. slozitost :-) zde neni pouzito Nette\Forms.

Priklad demonstruje velmi dulezity rys Nette Frameworku: v ramci aplikace a to vcetne sablon
se nepouzivaji URL. Ty jsou zalezitosti routeru a mohou se kdykoliv menit. Cilem odkazu je vzdy
Expand Down
4 changes: 2 additions & 2 deletions Fifteen/app/bootstrap.php
@@ -1,6 +1,6 @@
<?php

/*use Nette::Environment;*/
/*use Nette\Environment;*/


// Step 1: Load Nette Framework
Expand All @@ -12,7 +12,7 @@


// Step 2: Configure and setup application environment
// 2a) enable Nette::Debug for better exception and error visualisation
// 2a) enable Nette\Debug for better exception and error visualisation
Debug::enable(E_ALL | E_STRICT);

// 2b) check if directory /app/temp is writable
Expand Down
6 changes: 3 additions & 3 deletions Fifteen/app/components/FifteenControl.php
Expand Up @@ -16,7 +16,7 @@
*
* @author David Grudl
*/
class FifteenControl extends /*Nette::Application::*/Control
class FifteenControl extends /*Nette\Application\*/Control
{
/** @var int */
protected $width = 4;
Expand Down Expand Up @@ -52,7 +52,7 @@ public function __construct($parent = NULL, $name = NULL)
public function handleClick($x, $y)
{
if (!$this->isClickable($x, $y)) {
throw new /*Nette::Application::*/BadRequestException('Action not allowed.');
throw new /*Nette\Application\*/BadRequestException('Action not allowed.');
}

if ($this->presenter->isAjax()) {
Expand Down Expand Up @@ -136,7 +136,7 @@ public function render()
{
$template = $this->template;
$template->setFile(dirname(__FILE__) . '/FifteenControl.phtml');
$template->registerFilter(/*Nette::Templates::*/'TemplateFilters::curlyBrackets');
$template->registerFilter(/*Nette\Templates\*/'TemplateFilters::curlyBrackets');
$template->width = $this->width;
$template->order = $this->order;
$template->useAjax = $this->useAjax;
Expand Down
6 changes: 3 additions & 3 deletions Fifteen/app/presenters/DefaultPresenter.php
Expand Up @@ -3,19 +3,19 @@



class DefaultPresenter extends /*Nette::Application::*/Presenter
class DefaultPresenter extends /*Nette\Application\*/Presenter
{


public function prepareDefault()
{
require_once /*Nette::*/Environment::expand('%componentsDir%/FifteenControl.php');
require_once /*Nette\*/Environment::expand('%componentsDir%/FifteenControl.php');

$fifteen = new FifteenControl($this, 'game');
$fifteen->onGameOver[] = array($this, 'GameOver');
$fifteen->useAjax = TRUE;

$this->template->registerFilter(/*Nette::Templates::*/'TemplateFilters::curlyBrackets');
$this->template->registerFilter(/*Nette\Templates\*/'TemplateFilters::curlyBrackets');
$this->template->fifteen = $fifteen;

$this->invalidateControl('round');
Expand Down
10 changes: 5 additions & 5 deletions Forms/example1.php
@@ -1,7 +1,7 @@
<?php

/**
* Nette::Forms example 1
* Nette\Forms example 1
*
* - separated form and rules definition
* - manual form rendering
Expand All @@ -10,8 +10,8 @@

require_once '../../Nette/loader.php';

/*use Nette::Forms::Form;*/
/*use Nette::Debug;*/
/*use Nette\Forms\Form;*/
/*use Nette\Debug;*/

Debug::enable(E_ALL | E_STRICT);

Expand Down Expand Up @@ -136,7 +136,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />

<title>Nette::Forms example 1 | Nette Framework</title>
<title>Nette\Forms example 1 | Nette Framework</title>

<style type="text/css">
<!--
Expand Down Expand Up @@ -164,7 +164,7 @@
</head>

<body>
<h1>Nette::Forms example 1</h1>
<h1>Nette\Forms example 1</h1>

<?php $form->render('begin') ?>

Expand Down
12 changes: 6 additions & 6 deletions Forms/example2.php
@@ -1,7 +1,7 @@
<?php

/**
* Nette::Forms example 2
* Nette\Forms example 2
*
* - form definition using fluent interfaces
* - form groups usage
Expand All @@ -11,9 +11,9 @@

require_once '../../Nette/loader.php';

/*use Nette::Forms::Form;*/
/*use Nette::Debug;*/
/*use Nette::Web::Html;*/
/*use Nette\Forms\Form;*/
/*use Nette\Debug;*/
/*use Nette\Web\Html;*/

Debug::enable(E_ALL | E_STRICT);

Expand Down Expand Up @@ -166,7 +166,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />

<title>Nette::Forms example 2 | Nette Framework</title>
<title>Nette\Forms example 2 | Nette Framework</title>

<style type="text/css">
<!--
Expand Down Expand Up @@ -194,7 +194,7 @@
</head>

<body>
<h1>Nette::Forms example 2</h1>
<h1>Nette\Forms example 2</h1>

<?php echo $form ?>
</body>
Expand Down
14 changes: 7 additions & 7 deletions Forms/example3.php
@@ -1,7 +1,7 @@
<?php

/**
* Nette::Forms example 3
* Nette\Forms example 3
*
* - localization (with Zend_Translate)
*/
Expand All @@ -14,14 +14,14 @@
die('This example requires Zend Framework');
}

/*use Nette::Forms::Form;*/
/*use Nette::Debug;*/
/*use Nette::Web::Html;*/
/*use Nette\Forms\Form;*/
/*use Nette\Debug;*/
/*use Nette\Web\Html;*/

Debug::enable(E_ALL | E_STRICT);


class MyTranslator extends Zend_Translate implements /*Nette::*/ITranslator
class MyTranslator extends Zend_Translate implements /*Nette\*/ITranslator
{
/**
* Translates the given string.
Expand Down Expand Up @@ -167,7 +167,7 @@ public function translate($message, $plural = NULL)
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />

<title>Nette::Forms example 3 | Nette Framework</title>
<title>Nette\Forms example 3 | Nette Framework</title>

<style type="text/css">
<!--
Expand Down Expand Up @@ -195,7 +195,7 @@ public function translate($message, $plural = NULL)
</head>

<body>
<h1>Nette::Forms example 3</h1>
<h1>Nette\Forms example 3</h1>

<?php echo $form ?>
</body>
Expand Down

0 comments on commit b5fb307

Please sign in to comment.