Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to Nette 2.0 (stable) & Doctrine 2.2.0
- Loading branch information
Showing
522 changed files
with
27,349 additions
and
10,567 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!.* | ||
!web.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Order Allow,Deny | ||
Deny from all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<system.webServer> | ||
<rewrite> | ||
<rules> | ||
<rule name="Deny Rule 1" patternSyntax="Wildcard" stopProcessing="true"> | ||
<match url="*" /> | ||
<conditions> | ||
<add input="{URL}" pattern="*" /> | ||
</conditions> | ||
<action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this directory or page using the credentials that you supplied." /> | ||
</rule> | ||
</rules> | ||
</rewrite> | ||
</system.webServer> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,132 @@ | ||
<?php | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
/** | ||
* @ORM:entity | ||
* @ORM\Entity | ||
* | ||
* @property-read int $id | ||
* @property-read string $username | ||
* @property string $email | ||
* @property string $password | ||
* @property string $role | ||
*/ | ||
class User extends \Nette\Object | ||
{ | ||
/** | ||
* @ORM:id | ||
* @ORM:column(type="integer") | ||
* @ORM:generatedValue | ||
* @ORM\Id | ||
* @ORM\Column(type="integer") | ||
* @ORM\GeneratedValue | ||
* @var int | ||
*/ | ||
private $id; | ||
/** | ||
* @ORM:column | ||
* @ORM\Column(unique=true) | ||
* @var string | ||
*/ | ||
private $username; | ||
/** | ||
* @ORM:column | ||
* @ORM\Column | ||
* @var string | ||
*/ | ||
private $email; | ||
/** | ||
* @ORM\Column | ||
* @var string | ||
*/ | ||
private $password; | ||
|
||
/** | ||
* @ORM\Column | ||
* @var string | ||
*/ | ||
private $role; | ||
|
||
/** | ||
* @param string | ||
* @return User | ||
*/ | ||
public function __construct($username) | ||
{ | ||
$this->username = $username; | ||
$this->username = static::normalizeString($username); | ||
} | ||
|
||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
|
||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getUsername() | ||
{ | ||
return $this->username; | ||
} | ||
|
||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getPassword() | ||
{ | ||
return $this->password; | ||
} | ||
|
||
|
||
/** | ||
* @param string | ||
* @return User | ||
*/ | ||
public function setPassword($password) | ||
{ | ||
$this->password = $password; | ||
$this->password = static::normalizeString($password); | ||
return $this; | ||
} | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getEmail() | ||
{ | ||
return $this->email; | ||
} | ||
|
||
/** | ||
* @param string | ||
* @return User | ||
*/ | ||
public function setEmail($email) | ||
{ | ||
$this->email = static::normalizeString($email); | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getRole() | ||
{ | ||
return $this->role; | ||
} | ||
|
||
/** | ||
* @param string | ||
* @return User | ||
*/ | ||
public function setRole($role) | ||
{ | ||
$this->role = static::normalizeString($role); | ||
return $this; | ||
} | ||
|
||
/** | ||
* @param string | ||
* @return string | ||
*/ | ||
protected static function normalizeString($s) | ||
{ | ||
$s = trim($s); | ||
return $s === "" ? NULL : $s; | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!.* | ||
!web.config |
Oops, something went wrong.