Skip to content

Commit

Permalink
Updated docs. Version 0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
3nr1c committed Aug 12, 2015
1 parent 16974cc commit 0e79049
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 51 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,20 @@ $integer = new \Structure\IntegerS();
$integer->check("5");// false
```

As you can see in the examples above, ```FloatS``` and ```IntegerS``` are strict regarding ```string```s of numbers.
You can use the attribute ```$numeric``` (set to ```false``` by default) to avoid this strictness:

```php
$float = new \Structure\FloatS();
$integer = new \Structure\IntegerS();

$float->setNumeric(true);
$integer->setNumeric(true);

$float->check("3.2");// true
$integer->check("5");// true
```

## Class StringS

This class runs the ```is_string()``` test against a variable.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "3nr1c/structure",
"version": "0.4.1",
"version": "0.4.2",
"license": "MIT",
"authors": [
{
Expand Down
101 changes: 51 additions & 50 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0e79049

Please sign in to comment.