-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
689 additions
and
769 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,43 @@ | ||
.. index:: | ||
single: Doctrine; ORM console commands | ||
single: CLI; Doctrine ORM | ||
|
||
Console Commands | ||
---------------- | ||
|
||
The Doctrine2 ORM integration offers several console commands under the | ||
``doctrine`` namespace. To view the command list you can use the ``list`` | ||
command: | ||
|
||
.. code-block:: bash | ||
$ php app/console list doctrine | ||
A list of available commands will print out. You can find out more information | ||
about any of these commands (or any Symfony command) by running the ``help`` | ||
command. For example, to get details about the ``doctrine:database:create`` | ||
task, run: | ||
|
||
.. code-block:: bash | ||
$ php app/console help doctrine:database:create | ||
Some notable or interesting tasks include: | ||
|
||
* ``doctrine:ensure-production-settings`` - checks to see if the current | ||
environment is configured efficiently for production. This should always | ||
be run in the ``prod`` environment: | ||
|
||
.. code-block:: bash | ||
$ php app/console doctrine:ensure-production-settings --env=prod | ||
* ``doctrine:mapping:import`` - allows Doctrine to introspect an existing | ||
database and create mapping information. For more information, see | ||
:doc:`/cookbook/doctrine/reverse_engineering`. | ||
|
||
* ``doctrine:mapping:info`` - tells you all of the entities that Doctrine | ||
is aware of and whether or not there are any basic errors with the mapping. | ||
|
||
* ``doctrine:query:dql`` and ``doctrine:query:sql`` - allow you to execute | ||
DQL or SQL queries directly from the command line. |
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 |
---|---|---|
|
@@ -14,3 +14,4 @@ Doctrine | |
resolve_target_entity | ||
mapping_model_classes | ||
registration_form | ||
console |
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
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ Security | |
remember_me | ||
impersonating_user | ||
voters | ||
voters_data_permission | ||
acl | ||
acl_advanced | ||
force_https | ||
|
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,24 @@ | ||
.. code-block:: php | ||
|
||
interface VoterInterface | ||
{ | ||
public function supportsAttribute($attribute); | ||
public function supportsClass($class); | ||
public function vote(TokenInterface $token, $post, array $attributes); | ||
} | ||
|
||
The :method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface::supportsAttribute` | ||
method is used to check if the voter supports the given user attribute (i.e: | ||
a role like ``ROLE_USER``, an ACL ``EDIT``, etc.). | ||
|
||
The :method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface::supportsClass` | ||
method is used to check if the voter supports the class of the object whose | ||
access is being checked. | ||
|
||
The :method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface::vote` | ||
method must implement the business logic that verifies whether or not the | ||
user has access. This method must return one of the following values: | ||
|
||
* ``VoterInterface::ACCESS_GRANTED``: The authorization will be granted by this voter; | ||
* ``VoterInterface::ACCESS_ABSTAIN``: The voter cannot decide if authorization should be granted; | ||
* ``VoterInterface::ACCESS_DENIED``: The authorization will be denied by this voter. |
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
Oops, something went wrong.