remove unused code. update readme.
This commit is contained in:
parent
f32fa48291
commit
ac28d9eaa6
|
@ -31,15 +31,10 @@ The `Collection` class implements `ArrayAccess` and `Countable` interface intern
|
||||||
* `empty()`, `count()` can be used on instance of `Collection`.
|
* `empty()`, `count()` can be used on instance of `Collection`.
|
||||||
* Elements can be traversed via `foreach()` keyword.
|
* Elements can be traversed via `foreach()` keyword.
|
||||||
|
|
||||||
### 2.3 Comparing elements
|
|
||||||
|
|
||||||
Some methods of `Collection` involves comparing two of its elements, which accepts `$flags` as one of its arguments.
|
|
||||||
|
|
||||||
When these methods are being invoked, type of the very first element of the `Collection` represents that of all other ones. Make sure all elements are of the same type (numeric/string/others), otherwise you're likely to get a segfault.
|
|
||||||
|
|
||||||
### 2.4 Notes
|
### 2.4 Notes
|
||||||
|
|
||||||
* The `Collection::xxxTo()` methods will preserve the original key-value pairs of destination `Collection` when keys collide.
|
* The `Collection::xxxTo()` methods will preserve the original key-value pairs of destination `Collection` when keys collide.
|
||||||
|
* Some methods of `Collection` involves comparing two of its elements, which accepts `$flags` as one of its arguments. When these methods are being invoked, make sure all elements are of the same type (numeric/string/others), otherwise you're likely to get a segfault.
|
||||||
|
|
||||||
## 3. Example
|
## 3. Example
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,6 @@
|
||||||
#define ERR_BAD_SIZE() PHP_COLLECTIONS_ERROR(E_WARNING, "Size must be non-negative")
|
#define ERR_BAD_SIZE() PHP_COLLECTIONS_ERROR(E_WARNING, "Size must be non-negative")
|
||||||
#define ERR_BAD_INDEX() PHP_COLLECTIONS_ERROR(E_WARNING, "Index must be non-negative")
|
#define ERR_BAD_INDEX() PHP_COLLECTIONS_ERROR(E_WARNING, "Index must be non-negative")
|
||||||
#define ERR_NOT_ARITHMETIC() PHP_COLLECTIONS_ERROR(E_WARNING, "Elements should be int or double")
|
#define ERR_NOT_ARITHMETIC() PHP_COLLECTIONS_ERROR(E_WARNING, "Elements should be int or double")
|
||||||
#define ERR_BAD_FLAG() PHP_COLLECTIONS_ERROR(E_WARNING, "Invalid compare flag")
|
|
||||||
#define ERR_SILENCED()
|
#define ERR_SILENCED()
|
||||||
|
|
||||||
#define ELEMENTS_VALIDATE(elements, err, err_then) \
|
#define ELEMENTS_VALIDATE(elements, err, err_then) \
|
||||||
|
|
Reference in New Issue