50 Commits

Author SHA1 Message Date
bc63b7607f Fixed PHPDoc for BaseArrayHelper::index()
Closes #11556
2016-05-12 16:33:23 +03:00
c6d04644d3 passing properties to recursive call if properties of top object are not specified
fixes #7717
close #10960
2016-04-28 02:34:10 +02:00
5a425b2528 BaseArrayHelper::index() updated PHPDoc 2016-03-10 18:12:33 +02:00
91e2c71826 Fixes #@11071 2016-03-10 16:39:21 +02:00
e4d9ed5182 code style fix 2016-03-09 10:17:41 +02:00
438e5cfb5d BaseArrayHelper::isTraversable() PHPDoc update 2016-02-24 23:51:19 +02:00
16a6af5fa8 Add helper function for checking if an object is an array-like object.
Added support for traversable objects in `BaseHtml` and `ArrayHelper`
2016-02-24 23:49:05 +02:00
80e9331fe0 Spelling fixes, BaseArrayHelper::index() parameter groupBy renamed to groups 2016-02-24 23:43:09 +02:00
d56d2d7a31 BaseArrayHelper::index() - 3rd parameter renamed from dimensions to groupBy
PHPDoc updated
2016-02-24 23:07:37 +02:00
ef8b0a2be0 parameter dimensions in ArrayHelper::index 2016-02-15 17:47:44 +10:00
78de315794 Fixed processing nested objects multisort in BaseArrayHelper
fixes #8348
close #10607
2016-02-07 20:20:32 +01:00
ef5ce2d4c1 missing @since annotations in helpers 2016-02-07 17:46:12 +01:00
ed23b97baf #10574 - Fix for BaseArrayHelper to work with invalid characters in proper way 2016-01-16 09:37:36 +03:00
f6dcb290ed reverted c00b97a/#9915, this is expected behavior
When accessing non-existing properties it is expected behavior to throw an error.
This is the case in all other places.

It is also not reliably possible to determine whether a property exists beforehand.
it is not sufficient to call `property_exists()` as it may be available via `__get()`.

Instead of `property_exists()` or `isset()` it should call `$object->canGetProperty()` but this is not
guaranteed to be implemented and therefor doing such a check will not work in 2.0.x.

calling isset() may break code that works through __get() but has not implemented __isset() properly.

We may discuss this for 2.1 again but I am in favor of keeping it as is.
2016-01-15 16:19:24 +01:00
f72e9d5bcf Revert "#9915: changed behavior of ArrayHelper::getValue() according to @azureru suggestion"
This reverts commit 4b511fb9bcbb1fc5838ad8bc65f3852b09287acb.
2016-01-15 16:03:46 +02:00
4b511fb9bc #9915: changed behavior of ArrayHelper::getValue() according to @azureru suggestion 2016-01-15 15:21:08 +03:00
cd87d67f34 Global DOCS update: ~~~ replaced with ``` 2015-12-02 23:15:28 +02:00
e5ed256959 rename ArrayHelper::in() and ArrayHelper::subset()
22d9997281 (commitcomment-14527757)
2015-11-22 17:05:09 +01:00
22d9997281 Implemented support of traversable objects in RangeValidator::ranges, added ArrayHelper::in() and ArrayHelper::subset() 2015-11-18 16:41:56 +02:00
c00b97a12c Fixes #9915: yii\helpers\ArrayHelper::getValue() was erroring instead of returning null for non-existing object properties 2015-10-14 12:56:59 +03:00
68c30c1034 Replace aliases of functions 2015-06-29 22:59:22 +03:00
3ce02dd17c toArray can be string
update docs to reflect the available type
2015-06-24 14:21:18 +09:30
c339ed2949 Fixes #7764: \yii\helpers\ArrayHelper::toArray() wasn't passing $recursive to Arrayable::toArray 2015-05-31 13:09:16 +03:00
ef662b57be added missing @since annotations 2015-04-24 12:09:40 +02:00
8caaba0168 Allow specification of the $key as an array at yii\helpers\ArrayHelper::getValue() 2015-04-20 15:52:32 +03:00
fe19243da1 Fixes #6969: yii\helpers\ArrayHelper::htmlEncode() and htmlDecode() should not remove non-string data 2015-01-22 21:09:46 -05:00
ab926df29f Update BaseArrayHelper.php 2014-12-27 08:34:23 -05:00
95586f243c Fixed docblock for htmlEncode and htmlDecode [skip ci] 2014-12-01 11:47:39 +01:00
cf0c8c37dd Fixes #5983: Added Inflector::sentence() 2014-11-10 15:07:36 -05:00
a61c869256 fix docs 2014-11-10 13:51:39 -05:00
eddbb6bedb dropped locale option 2014-11-10 13:51:38 -05:00
a87c55ff97 fix camelCase syntax 2014-11-10 13:51:37 -05:00
05263692e5 Fixes #5938: add sentence method in Arrayhelper for convert the array to a comma-separated sentence 2014-11-10 13:51:37 -05:00
ba68986df0 Update BaseArrayHelper.php
Recursive method call must have the same parameters as the first call.
2014-11-05 10:59:26 -05:00
bcd2392673 ArrayHelper::toArray() now uses $properties parameter in recursive calls for descending objects 2014-11-03 23:12:04 +03:00
bf97adbf64 Expand abnormally used ternary operator to if 2014-10-01 12:25:08 +02:00
36e4930dcd Fixes #3669: added note about using ArrayHelper::getValue with objects 2014-06-09 01:34:11 +04:00
44273f0790 Revert "Merge pull request #3445 from Alex-Code/getValue"
This reverts commit a5846fa26983c53b9e98f10902e648140c322164, reversing
changes made to 2a6e064acadc1e80a083cbc86e3182920662bbe5.
2014-06-01 00:14:44 +04:00
274828839b Check if property is set
```getValue``` didn't check if the property on an object exists so wouldn't return the default value.
2014-05-12 16:31:44 +01:00
5ea81a91c9 Fixed document for multisort in BaseArrayHelper
Fixed
2014-05-05 16:33:08 +08:00
c6e1a2f02f Merge branch 'master' of github.com:yiisoft/yii2
* 'master' of github.com:yiisoft/yii2: (79 commits)
  Refactored app bootstrap logic.
  Update authorization.md
  Fixes #3052: Fixed the issue that cache dependency data is not reused when `reusable` is set true
  start debug logging only if debug runs when bootstrap.
  Update finnish translation
  Add ODBC support to yii\db\Connection
  updated error handler and requirement checker links.
  fixed broken API links [skip ci]
  added more doc [skip ci]
  update class map.
  Fixes #2034: Added `ContentNegotiator` to support response format and language negotiation
  renamed attributes to attributeNames in model
  updated phpdoc
  Removed `Application::preload` in favor of `Application::bootstrap`
  Update module-debug.md
  Update model.md
  Fixes
  Update basics.md
  typo fix [skip ci]
  Added `HtmlResponseFormatter` and `JsonResponseFormatter`
  ...
2014-04-10 22:22:36 +02:00
3c400dbca8 fixed file PHPdoc
issue #3026
2014-04-10 22:10:59 +02:00
0e143338d7 Finished refactoring find() . 2014-04-07 16:29:12 -04:00
b7d6f6141a Added isAssociative() and isIndexed() to yii\helpers\ArrayHelper 2014-04-07 16:02:55 -04:00
d774e7f127 fixed recursive call of ArrayHelper::toArray() 2014-03-26 15:13:26 +01:00
bf3c75147d reverted breaking PHPdoc codestyle changes
issue #2852
2014-03-23 20:51:09 +01:00
b5f8a4dc22 Reformat code te be PSR-2 compatible 2014-03-16 10:46:21 +06:00
9beba31fc0 rest WIP 2014-02-28 08:34:51 -05:00
6051253e6e BaseArrayHelper updated 2014-01-19 13:51:21 +04:00
0c38655217 psr-4 move 2014-01-10 21:41:43 -05:00