Skip to content

Commit 1e745e6

Browse files
committed
removed usage of Nette\Object
1 parent c65f994 commit 1e745e6

File tree

7 files changed

+21
-27
lines changed

7 files changed

+21
-27
lines changed

doc/cs/access-control.texy

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Napíšeme si vlastní autentikátor, který bude ověřovat přihlašovací úd
103103
/--php
104104
use Nette\Security as NS;
105105

106-
class MyAuthenticator extends Nette\Object implements NS\IAuthenticator
106+
class MyAuthenticator implements NS\IAuthenticator
107107
{
108108
public $database;
109109

@@ -216,8 +216,7 @@ Autorizátor je ten, kdo umí rozhodnout, zda má uživatel oprávnění provés
216216
Rámcová podoba implementace vypadá takto:
217217

218218
/--php
219-
class MyAuthorizator extends Nette\Object
220-
implements Nette\Security\IAuthorizator
219+
class MyAuthorizator implements Nette\Security\IAuthorizator
221220
{
222221

223222
function isAllowed($role, $resource, $privilege)
@@ -431,7 +430,7 @@ namespace App\Model;
431430

432431
use Nette;
433432

434-
class AuthorizatorFactory extends Nette\Object
433+
class AuthorizatorFactory
435434
{
436435
/** @return Nette\Security\Permission */
437436
public static function create()

doc/cs/components.texy

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,17 +291,15 @@ Dědičnost objektů nám umožňuje třídy zařadit do hierarchické struktury
291291
Ke správnému pochopení "jak věci pracují", je potřeba vědět, kde má která třída své kořeny.
292292

293293
/--
294-
Nette\Object
294+
Nette\ComponentModel\Component { IComponent }
295+
|
296+
+- Nette\ComponentModel\Container { IContainer }
295297
|
296-
+- Nette\ComponentModel\Component { IComponent }
298+
+- Nette\Application\UI\Component { ISignalReceiver, IStatePersistent }
297299
|
298-
+- Nette\ComponentModel\Container { IContainer }
300+
+- Nette\Application\UI\Control { IPartiallyRenderable }
299301
|
300-
+- Nette\Application\UI\Component { ISignalReceiver, IStatePersistent }
301-
|
302-
+- Nette\Application\UI\Control { IPartiallyRenderable }
303-
|
304-
+- Nette\Application\UI\Presenter { IPresenter }
302+
+- Nette\Application\UI\Presenter { IPresenter }
305303

306304
\--
307305

doc/cs/database.texy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class UserManager
141141

142142
private $connection;
143143

144-
public function __construct(Nette\Database\Connection $connection)
144+
public function __construct(Nette\Database\Connection $connection)
145145
{
146146
$this->connection = $connection;
147147
//nebo si vyzadame Nette\Database\Context, pokud chceme pracovat s Database\Table

doc/cs/forms.texy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ Pokud programujete vícejazyčnou aplikaci, budete nejspíš potřebovat stejný
10371037

10381038

10391039
/--php
1040-
class MyTranslator extends Nette\Object implements Nette\Localization\ITranslator
1040+
class MyTranslator implements Nette\Localization\ITranslator
10411041
{
10421042
/**
10431043
* Translates the given string.

doc/en/access-control.texy

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ We will create a custom authenticator that will check validity of login credenti
104104
/--php
105105
use Nette\Security as NS;
106106

107-
class MyAuthenticator extends Nette\Object implements NS\IAuthenticator
107+
class MyAuthenticator implements NS\IAuthenticator
108108
{
109109
public $database;
110110

@@ -216,8 +216,7 @@ Authorizator decides, whether the user has permission to take some action. It's
216216
An implementation skeleton looks like this:
217217

218218
/--php
219-
class MyAuthorizator extends Nette\Object
220-
implements Nette\Security\IAuthorizator
219+
class MyAuthorizator implements Nette\Security\IAuthorizator
221220
{
222221

223222
function isAllowed($role, $resource, $privilege)
@@ -427,7 +426,7 @@ namespace App\Model;
427426

428427
use Nette;
429428

430-
class AuthorizatorFactory extends Nette\Object
429+
class AuthorizatorFactory
431430
{
432431
/** @return Nette\Security\Permission */
433432
public static function create()

doc/en/components.texy

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,17 +214,15 @@ Object inheritance allows us to have a hierarchic structure of classes like in r
214214
Knowledge class hierarchy is required for proper understanding how things work.
215215

216216
/--
217-
Nette\Object
217+
Nette\ComponentModel\Component { IComponent }
218+
|
219+
+- Nette\ComponentModel\Container { IContainer }
218220
|
219-
+- Nette\ComponentModel\Component { IComponent }
221+
+- Nette\Application\UI\Component { ISignalReceiver, IStatePersistent }
220222
|
221-
+- Nette\ComponentModel\Container { IContainer }
223+
+- Nette\Application\UI\Control { IPartiallyRenderable }
222224
|
223-
+- Nette\Application\UI\Component { ISignalReceiver, IStatePersistent }
224-
|
225-
+- Nette\Application\UI\Control { IPartiallyRenderable }
226-
|
227-
+- Nette\Application\UI\Presenter { IPresenter }
225+
+- Nette\Application\UI\Presenter { IPresenter }
228226
\--
229227

230228

doc/en/forms.texy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ Multilingual Forms
10691069
If you are creating a multilingual application, you will need to render the very same form in many language mutations. Nette Framework forms have built-in support for translation. You simply set a *translator* the form, which is an object implementing [api:Nette\Localization\ITranslator] interface, having only one method `translate()`.
10701070

10711071
/--php
1072-
class MyTranslator extends Nette\Object implements Nette\Localization\ITranslator
1072+
class MyTranslator implements Nette\Localization\ITranslator
10731073
{
10741074
/**
10751075
* Translates the given string.

0 commit comments

Comments
 (0)