Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'fix/proofread.manual' of https://github.com/robertbasic…

…/zf2-documentation into hotfix/353
  • Loading branch information...
commit eaa651c0d8c051c0540547253a13af38b19699e2 2 parents 28a227a + 9bdcb3d
@weierophinney weierophinney authored
View
37 docs/languages/en/modules/zend.authentication.adapter.dbtable.rst
@@ -133,9 +133,44 @@ In addition to the availability of the ``getIdentity()`` method upon the authent
[password] => my_password
[real_name] => My Real Name
)
+ */
Since the table row contains the credential value, it is important to secure the values against unintended access.
+When retrieving the result object, we can either specify what columns to return, or what columns to omit:
+
+.. code-block:: php
+ :linenos:
+
+ $columnsToReturn = array(
+ 'id', 'username', 'real_name'
+ );
+ print_r($authAdapter->getResultRowObject($columnsToReturn));
+
+ /* Output:
+
+ Array
+ (
+ [id] => 1
+ [username] => my_username
+ [real_name] => My Real Name
+ )
+ */
+
+ $columnsToOmit = array('password');
+ print_r($authAdapter->getResultRowObject(null, $columnsToOmit);
+
+ /* Output:
+
+ Array
+ (
+ [id] => 1
+ [username] => my_username
+ [real_name] => My Real Name
+ )
+ */
+
+
.. _zend.authentication.adapter.dbtable.advanced.storing_result_row:
Advanced Usage: Persisting a DbTable Result Object
@@ -230,8 +265,10 @@ Here's a simple way to generate a salt string for every user at registration:
.. code-block:: php
:linenos:
+ $dynamicSalt = '';
for ($i = 0; $i < 50; $i++) {
$dynamicSalt .= chr(rand(33, 126));
+ }
And now let's build the adapter:
View
9 docs/languages/en/modules/zend.authentication.adapter.ldap.rst
@@ -31,6 +31,7 @@ not using ``Zend\Mvc``, the meat of your code should look something like the fol
use Zend\Authentication\AuthenticationService;
use Zend\Authentication\Adapter\Ldap as AuthAdapter;
use Zend\Config\Reader\Ini as ConfigReader;
+ use Zend\Config\Config;
use Zend\Log\Logger;
use Zend\Log\Writer\Stream as LogWriter;
use Zend\Log\Filter\Priority as LogFilter;
@@ -41,10 +42,12 @@ not using ``Zend\Mvc``, the meat of your code should look something like the fol
$auth = new AuthenticationService();
- $config = new ConfigReader('./ldap-config.ini','production');
+ $configReader = new ConfigReader();
+ $configData = $configReader->fromFile('./ldap-config.ini');
+ $config = new Config($configData, true);
- $log_path = $config->ldap->log_path;
- $options = $config->ldap->toArray();
+ $log_path = $config->production->ldap->log_path;
+ $options = $config->production->ldap->toArray();
unset($options['log_path']);
$adapter = new AuthAdapter($options,
View
4 docs/languages/en/modules/zend.authentication.intro.rst
@@ -317,9 +317,9 @@ Usage
There are two provided ways to use ``Zend\Authentication`` adapters:
-. indirectly, through ``Zend\Authentication\AuthenticationService::authenticate()``
+- indirectly, through ``Zend\Authentication\AuthenticationService::authenticate()``
-. directly, through the adapter's ``authenticate()`` method
+- directly, through the adapter's ``authenticate()`` method
The following example illustrates how to use a ``Zend\Authentication`` adapter indirectly, through the use of the
``Zend\Authentication\AuthenticationService`` class:
View
12 docs/languages/en/modules/zend.barcode.creation.rst
@@ -8,18 +8,18 @@ Barcode creation using Zend\\Barcode\\Barcode class
Using Zend\\Barcode\\Barcode::factory
-------------------------------------
-``Zend_Barcode`` uses a factory method to create an instance of a renderer that extends
+``Zend\Barcode\Barcode`` uses a factory method to create an instance of a renderer that extends
``Zend\Barcode\Renderer\AbstractRenderer``. The factory method accepts five arguments.
-. The name of the barcode format (e.g., "code39") or a `Traversable`_ object (required)
+- The name of the barcode format (e.g., "code39") or a `Traversable`_ object (required)
-. The name of the renderer (e.g., "image") (required)
+- The name of the renderer (e.g., "image") (required)
-. Options to pass to the barcode object (an array or a `Traversable`_ object) (optional)
+- Options to pass to the barcode object (an array or a `Traversable`_ object) (optional)
-. Options to pass to the renderer object (an array or a `Traversable`_ object) (optional)
+- Options to pass to the renderer object (an array or a `Traversable`_ object) (optional)
-. Boolean to indicate whether or not to automatically render errors. If an exception occurs, the provided barcode
+- Boolean to indicate whether or not to automatically render errors. If an exception occurs, the provided barcode
object will be replaced with an Error representation (optional default ``TRUE``)
.. _zend.barcode.creation.configuration.example-1:
View
2  docs/languages/en/modules/zend.validator.between.rst
@@ -7,7 +7,7 @@ Between
.. note::
- **Zend\Validator\Between supports only number validation**
+ **Zend\\Validator\\Between supports only number validation**
It should be noted that ``Zend\Validator\Between`` supports only the validation of numbers. Strings or dates can
not be validated with this validator.
View
82 docs/languages/en/modules/zend.validator.credit-card.rst
@@ -20,29 +20,29 @@ The following issuing institutes are accepted:
- **American Express**
- **China UnionPay**
+- **China UnionPay**
- **Diners Club Card Blanche**
+- **Diners Club Card Blanche**
- **Diners Club International**
+- **Diners Club International**
- **Diners Club US & Canada**
+- **Diners Club US & Canada**
- **Discover Card**
+- **Discover Card**
- **JCB**
+- **JCB**
- **Laser**
+- **Laser**
- **Maestro**
+- **Maestro**
- **MasterCard**
+- **MasterCard**
- **Solo**
+- **Solo**
- **Visa**
+- **Visa**
- **Visa Electron**
+- **Visa Electron**
.. note::
@@ -129,35 +129,35 @@ this case you have to provide the institutes with the ``type`` array key as simu
.. table:: Constants for credit card institutes
- +-------------------------+----------------+
- |Institute |Constant |
- +=========================+================+
- |American Express |AMERICAN_EXPRESS|
- +-------------------------+----------------+
- |China UnionPay |UNIONPAY |
- +-------------------------+----------------+
- |Diners Club Card Blanche |DINERS_CLUB |
- +-------------------------+----------------+
- |Diners Club International|DINERS_CLUB |
- +-------------------------+----------------+
- |Diners Club US & Canada |DINERS_CLUB_US |
- +-------------------------+----------------+
- |Discover Card |DISCOVER |
- +-------------------------+----------------+
- |JCB |JCB |
- +-------------------------+----------------+
- |Laser |LASER |
- +-------------------------+----------------+
- |Maestro |MAESTRO |
- +-------------------------+----------------+
- |MasterCard |MASTERCARD |
- +-------------------------+----------------+
- |Solo |SOLO |
- +-------------------------+----------------+
- |Visa |VISA |
- +-------------------------+----------------+
- |Visa Electron |VISA |
- +-------------------------+----------------+
+ +-------------------------+-------------------------------------------+
+ |Institute |Constant |
+ +=========================+===========================================+
+ |American Express |Zend\Validator\CreditCard::AMERICAN_EXPRESS|
+ +-------------------------+-------------------------------------------+
+ |China UnionPay |Zend\Validator\CreditCard::UNIONPAY |
+ +-------------------------+-------------------------------------------+
+ |Diners Club Card Blanche |Zend\Validator\CreditCard::DINERS_CLUB |
+ +-------------------------+-------------------------------------------+
+ |Diners Club International|Zend\Validator\CreditCard::DINERS_CLUB |
+ +-------------------------+-------------------------------------------+
+ |Diners Club US & Canada |Zend\Validator\CreditCard::DINERS_CLUB_US |
+ +-------------------------+-------------------------------------------+
+ |Discover Card |Zend\Validator\CreditCard::DISCOVER |
+ +-------------------------+-------------------------------------------+
+ |JCB |Zend\Validator\CreditCard::JCB |
+ +-------------------------+-------------------------------------------+
+ |Laser |Zend\Validator\CreditCard::LASER |
+ +-------------------------+-------------------------------------------+
+ |Maestro |Zend\Validator\CreditCard::MAESTRO |
+ +-------------------------+-------------------------------------------+
+ |MasterCard |Zend\Validator\CreditCard::MASTERCARD |
+ +-------------------------+-------------------------------------------+
+ |Solo |Zend\Validator\CreditCard::SOLO |
+ +-------------------------+-------------------------------------------+
+ |Visa |Zend\Validator\CreditCard::VISA |
+ +-------------------------+-------------------------------------------+
+ |Visa Electron |Zend\Validator\CreditCard::VISA |
+ +-------------------------+-------------------------------------------+
You can also set or add institutes afterward instantiation by using the methods ``setType()``, ``addType()`` and
``getType()``.
View
2  docs/languages/en/modules/zend.validator.date.rst
@@ -75,7 +75,7 @@ Of course you can combine ``format`` and ``locale``. In this case you can also u
.. code-block:: php
:linenos:
- $validator = new Zend\Validator\Date(array('format' => 'yyyy MMMM', 'locale' => 'de));
+ $validator = new Zend\Validator\Date(array('format' => 'yyyy MMMM', 'locale' => 'de'));
$validator->isValid('2010 Dezember'); // returns true
$validator->isValid('2010 June'); // returns false
View
4 docs/languages/en/modules/zend.validator.db.rst
@@ -8,8 +8,8 @@ record exists in a given table of a database, with a given value.
.. _zend.validator.set.db.options:
-Supported options for Zend\\Validator\\Db_*
--------------------------------------------
+Supported options for Zend\\Validator\\Db\\*
+--------------------------------------------
The following options are supported for ``Zend\Validator\Db\NoRecordExists`` and
``Zend\Validator\Db\RecordExists``:
View
2  docs/languages/en/modules/zend.validator.greater-than.rst
@@ -7,7 +7,7 @@ GreaterThan
.. note::
- **Zend\Validator\GreaterThan supports only number validation**
+ **Zend\\Validator\\GreaterThan supports only number validation**
It should be noted that ``Zend\Validator\GreaterThan`` supports only the validation of numbers. Strings or dates
can not be validated with this validator.
View
2  docs/languages/en/modules/zend.validator.less-than.rst
@@ -7,7 +7,7 @@ LessThan
.. note::
- **Zend\Validator\LessThan supports only number validation**
+ **Zend\\Validator\\LessThan supports only number validation**
It should be noted that ``Zend\Validator\LessThan`` supports only the validation of numbers. Strings or dates
can not be validated with this validator.
View
2  docs/languages/en/modules/zend.validator.messages.rst
@@ -71,7 +71,7 @@ So to translate all validation messages to German for example, all you have to d
'phpArray'
'resources/languages/en.php',
'default',
- 'en_US
+ 'en_US'
);
Zend\Validator\AbstractValidator::setDefaultTranslator($translator);
View
5 docs/languages/en/modules/zend.validator.rst
@@ -158,11 +158,6 @@ you from setting a translator manually for all validator classes, and simplifies
Zend\Validator\AbstractValidator::setDefaultTranslator($translate);
-.. note::
-
- When you have set an application wide locale within your registry, then this locale will be used as default
- translator.
-
Sometimes it is necessary to disable the translator within a validator. To archive this you can use the
``setDisableTranslator()`` method, which accepts a boolean parameter, and ``isTranslatorDisabled()`` to get the set
value.
View
2  docs/languages/en/modules/zend.validator.string-length.rst
@@ -7,7 +7,7 @@ This validator allows you to validate if a given string is between a defined len
.. note::
- **Zend\Validator\StringLength supports only string validation**
+ **Zend\\Validator\\StringLength supports only string validation**
It should be noted that ``Zend\Validator\StringLength`` supports only the validation of strings. Integers,
floats, dates or objects can not be validated with this validator.
View
5 docs/languages/en/modules/zend.validator.writing-validators.rst
@@ -3,9 +3,8 @@
Writing Validators
==================
-``Zend\Validator\AbstractValidator`` supplies a set of commonly needed validators, but inevitably, developers will
-wish to write custom validators for their particular needs. The task of writing a custom validator is described in
-this section.
+``Zend\Validator`` supplies a set of commonly needed validators, but inevitably, developers will wish to write
+custom validators for their particular needs. The task of writing a custom validator is described in this section.
``Zend\Validator\ValidatorInterface`` defines two methods, ``isValid()`` and ``getMessages()``, that may be
implemented by user classes in order to create custom validation objects. An object that implements
Please sign in to comment.
Something went wrong with that request. Please try again.