OSDN Git Service

php-libraries/Router.git
7 years agoreplace quotes to avoid unexpected behavior on regex
Jefersson Nathan [Fri, 23 Dec 2016 14:48:16 +0000 (11:48 -0300)]
replace quotes to avoid unexpected behavior on regex

7 years agoMerge pull request #94 from dannyvankooten/ignore-composer-lock
Jefersson Nathan [Thu, 22 Dec 2016 11:35:51 +0000 (08:35 -0300)]
Merge pull request #94 from dannyvankooten/ignore-composer-lock

add composer.lock to .gitignore

7 years agoignore composer.lock
Jefersson Nathan [Thu, 22 Dec 2016 11:32:40 +0000 (08:32 -0300)]
ignore composer.lock

7 years agoMerge pull request #91 from dannyvankooten/use-preg_quote-on-regex
Jefersson Nathan [Thu, 22 Dec 2016 02:58:12 +0000 (23:58 -0300)]
Merge pull request #91 from dannyvankooten/use-preg_quote-on-regex

Use preg_quote on regex

7 years agoUse preg_quote on regex as for security reasons
Jefersson Nathan [Mon, 19 Dec 2016 12:05:19 +0000 (09:05 -0300)]
Use preg_quote on regex as for security reasons

7 years agoMerge pull request #85 from antoine-pous/master
Antoine Pous [Sun, 30 Oct 2016 22:24:58 +0000 (23:24 +0100)]
Merge pull request #85 from antoine-pous/master

Improvements + unit tests

7 years agoMerge pull request #84 from TomasVotruba/patch-1
Antoine Pous [Sun, 30 Oct 2016 22:20:51 +0000 (23:20 +0100)]
Merge pull request #84 from TomasVotruba/patch-1

Composer: allow PHP 7 in safer way

7 years agoFix issue #69 and properly implement PR #65 & #67 + unit tests
Antoine Pous [Thu, 27 Oct 2016 11:36:25 +0000 (13:36 +0200)]
Fix issue #69 and properly implement PR #65 & #67 + unit tests

7 years agoMerge remote-tracking branch 'upstream/master'
Antoine Pous [Thu, 27 Oct 2016 10:22:56 +0000 (12:22 +0200)]
Merge remote-tracking branch 'upstream/master'

7 years agocomoser: allow PHP 7 in safer way
Tomáš Votruba [Sat, 15 Oct 2016 11:04:34 +0000 (13:04 +0200)]
comoser: allow PHP 7 in safer way

7 years agoMerge pull request #77 from jackmakiyama/fix/url-match
Jefersson Nathan [Tue, 24 May 2016 05:54:49 +0000 (02:54 -0300)]
Merge pull request #77 from jackmakiyama/fix/url-match

Fixes the match route comparison just for left direction.

7 years agoFixes the match route comparison just for left direction.
Jack Makiyama [Tue, 24 May 2016 05:40:03 +0000 (01:40 -0400)]
Fixes the match route comparison just for left direction.

8 years agoChange object to static calls on assertion methods
Jefersson Nathan [Tue, 5 Apr 2016 11:27:09 +0000 (08:27 -0300)]
Change object to static calls on assertion methods

8 years agoMake static call in assertion method
Jefersson Nathan [Mon, 4 Apr 2016 11:24:58 +0000 (08:24 -0300)]
Make static call in assertion method

8 years agoRemove null initialization
Jefersson Nathan [Sun, 3 Apr 2016 11:22:24 +0000 (08:22 -0300)]
Remove null initialization

8 years agoUse single quotes when possible
Jefersson Nathan [Sat, 2 Apr 2016 11:21:37 +0000 (08:21 -0300)]
Use single quotes when possible

8 years agoGroup `isset` calls
Jefersson Nathan [Fri, 1 Apr 2016 11:20:45 +0000 (08:20 -0300)]
Group `isset` calls

8 years agosimplify current logic
Jefersson Nathan [Tue, 29 Mar 2016 11:18:33 +0000 (08:18 -0300)]
simplify current logic

8 years agofix subsequent align
Jefersson Nathan [Mon, 28 Mar 2016 11:17:59 +0000 (08:17 -0300)]
fix subsequent align

8 years agoRemove paragraph referencing to an example file
Jefersson Nathan [Sun, 27 Mar 2016 11:13:31 +0000 (08:13 -0300)]
Remove paragraph referencing to an example file

8 years agoUpdate composer installation method
Jefersson Nathan [Sat, 26 Mar 2016 11:11:30 +0000 (08:11 -0300)]
Update composer installation method

8 years agoAdded badges to readme
Jefersson Nathan [Fri, 25 Mar 2016 11:09:32 +0000 (08:09 -0300)]
Added badges to readme

8 years agoPsr-4 complains
Jefersson Nathan [Thu, 24 Mar 2016 11:03:32 +0000 (08:03 -0300)]
Psr-4 complains

8 years agoMerge pull request #74 from duylecampos/hotfix-1.1.3
Jefersson Nathan [Thu, 21 Apr 2016 10:41:16 +0000 (07:41 -0300)]
Merge pull request #74 from duylecampos/hotfix-1.1.3

Remove wrong index sum

8 years agoRemove wrong index sum
Duyle Campos [Mon, 7 Mar 2016 17:03:20 +0000 (14:03 -0300)]
Remove wrong index sum

8 years agoMerge pull request #72 from pine3ree/patch-1
Jefersson Nathan [Wed, 10 Feb 2016 17:40:02 +0000 (14:40 -0300)]
Merge pull request #72 from pine3ree/patch-1

avoid calling getName twice per route

8 years agoavoid calling getName twice per route
maks feltrin [Wed, 10 Feb 2016 17:10:55 +0000 (18:10 +0100)]
avoid calling getName twice per route

8 years agoMerge pull request #68 from duylecampos/hotfix-1.1.2
Jefersson Nathan [Tue, 22 Dec 2015 15:49:13 +0000 (12:49 -0300)]
Merge pull request #68 from duylecampos/hotfix-1.1.2

Refactor route to check number of parameters received

8 years agoMerge pull request #70 from dannyvankooten/enhancement/add-phpunit-xml-namespace
Jefersson Nathan [Tue, 22 Dec 2015 15:49:03 +0000 (12:49 -0300)]
Merge pull request #70 from dannyvankooten/enhancement/add-phpunit-xml-namespace

Add phpunit xml namespace

8 years agoRemove old invalid param
Jefersson Nathan [Tue, 22 Dec 2015 15:48:14 +0000 (12:48 -0300)]
Remove old invalid param

8 years agoAdded phpunit xml namespace
Jefersson Nathan [Tue, 22 Dec 2015 15:48:02 +0000 (12:48 -0300)]
Added phpunit xml namespace

8 years agoRefactor route to check number of parameters received
Duyle Campos [Wed, 4 Nov 2015 21:21:49 +0000 (19:21 -0200)]
Refactor route to check number of parameters received

8 years agoTry to load class constructor when method name is not set or empty
Antoine Pous [Sun, 18 Oct 2015 07:38:27 +0000 (09:38 +0200)]
Try to load class constructor when method name is not set or empty

8 years agoMerge pull request #1 from dannyvankooten/master
Antoine pous [Sun, 18 Oct 2015 07:22:27 +0000 (09:22 +0200)]
Merge pull request #1 from dannyvankooten/master

Sync

8 years agoMerge pull request #66 from endelwar/full-test-coverage
Jefersson Nathan [Wed, 7 Oct 2015 14:14:17 +0000 (11:14 -0300)]
Merge pull request #66 from endelwar/full-test-coverage

100% test coverage

8 years agoMerge pull request #63 from endelwar/fix-named-routes
Jefersson Nathan [Tue, 6 Oct 2015 12:29:08 +0000 (09:29 -0300)]
Merge pull request #63 from endelwar/fix-named-routes

Fix named routes

8 years ago100% test coverage
Manuel Dalla Lana [Sun, 27 Sep 2015 13:27:48 +0000 (15:27 +0200)]
100% test coverage

8 years agoFix named routes
Manuel Dalla Lana [Sun, 27 Sep 2015 13:06:09 +0000 (15:06 +0200)]
Fix named routes

8 years agoMerge pull request #62 from endelwar/nginx-readme
Jefersson Nathan [Sat, 26 Sep 2015 18:15:41 +0000 (15:15 -0300)]
Merge pull request #62 from endelwar/nginx-readme

Insert nginx configuration in readme file

8 years agoInsert nginx configuration in readme file
Manuel Dalla Lana [Sat, 26 Sep 2015 14:26:40 +0000 (16:26 +0200)]
Insert nginx configuration in readme file

8 years agoMerge pull request #61 from endelwar/enhance-tests
Jefersson Nathan [Fri, 25 Sep 2015 18:30:28 +0000 (15:30 -0300)]
Merge pull request #61 from endelwar/enhance-tests

Enhance tests and compatibility

8 years agoadd PHPRouter\Route tests
Manuel Dalla Lana [Fri, 25 Sep 2015 09:03:09 +0000 (11:03 +0200)]
add PHPRouter\Route tests

target and name tests are missing at the moment because the first is unused and the second is broken

8 years agoadd test for Router::parseConfig
Manuel Dalla Lana [Fri, 25 Sep 2015 09:02:12 +0000 (11:02 +0200)]
add test for Router::parseConfig

8 years agoadd build dir to .gitignore
Manuel Dalla Lana [Fri, 25 Sep 2015 07:35:04 +0000 (09:35 +0200)]
add build dir to .gitignore

8 years agoPSR2 compatibility
Manuel Dalla Lana [Fri, 25 Sep 2015 07:34:42 +0000 (09:34 +0200)]
PSR2 compatibility

also fixes makefile

8 years agoconvert short array syntax to a php5.3+ compatible one
Manuel Dalla Lana [Fri, 25 Sep 2015 07:22:40 +0000 (09:22 +0200)]
convert short array syntax to a php5.3+ compatible one

8 years agoenable backupGlobals in phpunit.xml
Manuel Dalla Lana [Fri, 25 Sep 2015 07:19:29 +0000 (09:19 +0200)]
enable backupGlobals in phpunit.xml

8 years agoenhance phpunit.xml and fix some tests
Manuel Dalla Lana [Thu, 24 Sep 2015 17:56:22 +0000 (19:56 +0200)]
enhance phpunit.xml and fix some tests

8 years agoMerge pull request #60 from duylecampos/hotfix-1.1.0
Jefersson Nathan [Sun, 20 Sep 2015 17:08:21 +0000 (14:08 -0300)]
Merge pull request #60 from duylecampos/hotfix-1.1.0

Refactor router to check currentDir before replace

8 years agoRefactor router to check currentDir before replace
Duyle Campos [Fri, 18 Sep 2015 23:34:34 +0000 (20:34 -0300)]
Refactor router to check currentDir before replace

Check if currentDir not is / before replace in requesturl

closes github/issue 56

8 years agoMerge pull request #57 from malukenho/bug/url-match
Jefersson Nathan [Thu, 13 Aug 2015 03:43:27 +0000 (00:43 -0300)]
Merge pull request #57 from malukenho/bug/url-match

Bug to match router using basePath config

8 years agoTrim slash on url, solve bug
Jefersson Nathan [Sun, 12 Jul 2015 12:49:04 +0000 (09:49 -0300)]
Trim slash on url, solve bug

8 years agoRemove old test
Jefersson Nathan [Fri, 10 Jul 2015 12:48:25 +0000 (09:48 -0300)]
Remove old test

8 years agoTransport new tests
Jefersson Nathan [Thu, 9 Jul 2015 12:46:57 +0000 (09:46 -0300)]
Transport new tests

8 years agoReorganize tests
Jefersson Nathan [Mon, 10 Aug 2015 12:40:01 +0000 (09:40 -0300)]
Reorganize tests

8 years agoAdded tests for router match using basepath
Jefersson Nathan [Sun, 2 Aug 2015 12:33:08 +0000 (09:33 -0300)]
Added tests for router match using basepath

8 years agoAdded tests for router match using basepath
Jefersson Nathan [Sat, 1 Aug 2015 12:27:30 +0000 (09:27 -0300)]
Added tests for router match using basepath

8 years agoRemove php keyword
Jefersson Nathan [Mon, 27 Apr 2015 14:58:55 +0000 (11:58 -0300)]
Remove php keyword

8 years agoIndent composer.json with 2 spaces
Jefersson Nathan [Sun, 26 Apr 2015 14:57:58 +0000 (11:57 -0300)]
Indent composer.json with 2 spaces

8 years agoDelete old tests files
Jefersson Nathan [Thu, 7 May 2015 14:53:50 +0000 (11:53 -0300)]
Delete old tests files

8 years agoChange namespaces of tests to not conflict with real namespaces
Jefersson Nathan [Tue, 2 Jun 2015 14:52:50 +0000 (11:52 -0300)]
Change namespaces of tests to not conflict with real namespaces

8 years agoAdded PHPUnit as a composer dev dependency
Jefersson Nathan [Mon, 25 May 2015 14:48:38 +0000 (11:48 -0300)]
Added PHPUnit as a composer dev dependency

8 years agoRemove old internal variable docummentor
Jefersson Nathan [Sat, 9 May 2015 20:35:42 +0000 (17:35 -0300)]
Remove old internal variable docummentor

8 years agoAdd IDE hint
Jefersson Nathan [Sat, 18 Jul 2015 20:26:44 +0000 (17:26 -0300)]
Add IDE hint

8 years agoWrite docummentation block
Jefersson Nathan [Mon, 20 Jul 2015 20:23:43 +0000 (17:23 -0300)]
Write docummentation block

8 years agoFix code standard
Jefersson Nathan [Fri, 10 Jul 2015 20:21:17 +0000 (17:21 -0300)]
Fix code standard

8 years agoUpdate license date
Jefersson Nathan [Fri, 24 Apr 2015 20:16:58 +0000 (17:16 -0300)]
Update license date

8 years agoAdded authors to Readme
Jefersson Nathan [Wed, 22 Apr 2015 20:14:46 +0000 (17:14 -0300)]
Added authors to Readme

8 years agoRemove trim $requestUrl
Jefersson Nathan [Sat, 25 Apr 2015 14:25:23 +0000 (11:25 -0300)]
Remove trim $requestUrl

8 years agoMake possible to use PHPRouter on a subpath folder as `localhost/app/web`
Jefersson Nathan [Wed, 6 May 2015 13:42:36 +0000 (10:42 -0300)]
Make possible to use PHPRouter on a subpath folder as `localhost/app/web`

8 years agoDocblocks align
Jefersson Nathan [Tue, 28 Apr 2015 13:40:04 +0000 (10:40 -0300)]
Docblocks align

8 years ago #56 - Fix array short syntax
Jefersson Nathan [Wed, 10 Jun 2015 13:34:40 +0000 (10:34 -0300)]
 #56 - Fix array short syntax

8 years ago #56 - Create tests for dynamic router
Jefersson Nathan [Tue, 9 Jun 2015 13:33:52 +0000 (10:33 -0300)]
 #56 - Create tests for dynamic router

8 years ago #56 - Add fixture method to test dynamic router using filter
Jefersson Nathan [Fri, 5 Jun 2015 13:31:45 +0000 (10:31 -0300)]
 #56 - Add fixture method to test dynamic router using filter

8 years ago #56 - Fix use filter on named parameters
Jefersson Nathan [Sat, 13 Jun 2015 13:09:16 +0000 (10:09 -0300)]
 #56 - Fix use filter on named parameters

8 years agoAdd throws doc
Jefersson Nathan [Fri, 17 Apr 2015 11:55:24 +0000 (08:55 -0300)]
Add throws doc

8 years agoReplay same structure for tests stuff and close #42
Jefersson Nathan [Sat, 11 Apr 2015 11:46:37 +0000 (08:46 -0300)]
Replay same structure for tests stuff and close #42

8 years agoFix IDE hint
Jefersson Nathan [Fri, 1 May 2015 11:41:52 +0000 (08:41 -0300)]
Fix IDE hint

8 years agoConvert array syntax to traditional, this broken on php 5.3
Jefersson Nathan [Wed, 29 Apr 2015 11:40:39 +0000 (08:40 -0300)]
Convert array syntax to traditional, this broken on php 5.3

8 years agoTest parameters properly, thanks for @Antoine-Pous
Jefersson Nathan [Thu, 11 Jun 2015 11:30:34 +0000 (08:30 -0300)]
Test parameters properly, thanks for @Antoine-Pous

8 years agoAvoid printing things on screen
Jefersson Nathan [Wed, 20 May 2015 11:28:52 +0000 (08:28 -0300)]
Avoid printing things on screen

8 years agoFix params tags types
Jefersson Nathan [Mon, 20 Apr 2015 11:10:45 +0000 (08:10 -0300)]
Fix params tags types

8 years agoAdd dockblock return tags
Jefersson Nathan [Mon, 23 Mar 2015 11:09:40 +0000 (08:09 -0300)]
Add dockblock return tags

8 years agoAdd dockblock params declaration
Jefersson Nathan [Sun, 22 Mar 2015 11:04:59 +0000 (08:04 -0300)]
Add dockblock params declaration

8 years agoMerge pull request #54 from Antoine-Pous/master
Jefersson Nathan [Mon, 15 Jun 2015 10:54:41 +0000 (07:54 -0300)]
Merge pull request #54 from Antoine-Pous/master

Added parameters by name

8 years agoMerge remote-tracking branch 'jarednova/fix_psr_0'
Jefersson Nathan [Mon, 15 Jun 2015 10:45:46 +0000 (07:45 -0300)]
Merge remote-tracking branch 'jarednova/fix_psr_0'

Conflicts:
composer.json

9 years agoUpdate RouterTest.php
Antoine pous [Thu, 9 Apr 2015 15:01:50 +0000 (17:01 +0200)]
Update RouterTest.php

9 years agoUpdate SomeController.php
Antoine pous [Thu, 9 Apr 2015 15:01:19 +0000 (17:01 +0200)]
Update SomeController.php

9 years agoAdded parameters by name
Antoine pous [Tue, 7 Apr 2015 16:23:42 +0000 (18:23 +0200)]
Added parameters by name

Parameters by name add simple way to get named parameters into the controller method.
This optionnal argument, set to false by default, is available from setFilters method and can be used individually for each route.

Route :
```PHP
$route = new Route('/:page_id',     ['_controller' => 'App\Controller\someController::method', 'methods' => 'GET' ]);
$route->setFilters([':page_id' => '([a-zA-Z]+)'], true);
```

Controller :
```PHP
class someController
{
  public function myMethod() {
    var_dump(func_get_args());
    // display : array(1) { [0]=> array(1) { ["page_id"]=> string(5) "mySuperPage" } }
  }
}
```

9 years agoMerge pull request #53 from palicao/doc-fix
Jefersson Nathan [Thu, 26 Mar 2015 04:33:09 +0000 (01:33 -0300)]
Merge pull request #53 from palicao/doc-fix

Update documentation with the new function name

9 years agoUpdate documentation with the new function name
Alessandro Balasco [Thu, 12 Mar 2015 08:22:29 +0000 (09:22 +0100)]
Update documentation with the new function name

$collection->attach becomes $collection->attachRoute

9 years agoMerge pull request #52 from palicao/syntax-fixes
Jefersson Nathan [Mon, 9 Mar 2015 20:51:24 +0000 (17:51 -0300)]
Merge pull request #52 from palicao/syntax-fixes

Small syntax fixes to avoid PHP notices and to pass tests

9 years agoModified method name also for config loading
palicao [Sun, 8 Mar 2015 16:40:44 +0000 (17:40 +0100)]
Modified method name also for config loading

9 years agoModified test to comply with the new syntax
palicao [Sun, 8 Mar 2015 16:26:56 +0000 (17:26 +0100)]
Modified test to comply with the new syntax

9 years agoChanged method name to avoid Strict Standards: Declaration of PHPRouter\RouteCollecti...
palicao [Sun, 8 Mar 2015 16:23:56 +0000 (17:23 +0100)]
Changed method name to avoid Strict Standards: Declaration of PHPRouter\RouteCollection::attach() should be compatible with SplObjectStorage::attach error

9 years agoSmall syntax fixes to avoid PHP notices and to pass tests
palicao [Sun, 8 Mar 2015 16:06:42 +0000 (17:06 +0100)]
Small syntax fixes to avoid PHP notices and to pass tests

9 years agofixed typo in PHProuter ==> PHPRouter
Jared Novack [Tue, 17 Feb 2015 05:33:21 +0000 (21:33 -0800)]
fixed typo in PHProuter ==> PHPRouter

9 years agoMerge pull request #49 from malukenho/hotfix/declare-missing-property
Jefersson Nathan [Tue, 3 Feb 2015 11:21:58 +0000 (08:21 -0300)]
Merge pull request #49 from malukenho/hotfix/declare-missing-property

Declare dynamic created Router#_config and rename it to Router#config

9 years agoBack port array long syntax
malukenho [Thu, 18 Dec 2014 11:20:43 +0000 (08:20 -0300)]
Back port array long syntax

9 years agoFix align of equals on constructor method
malukenho [Thu, 25 Dec 2014 11:20:05 +0000 (08:20 -0300)]
Fix align of equals on constructor method