Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2012-2013 ThinFrame Project

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A collection of PHP classes that simplifies the work with the HTTP protocol.

##Installation

* via Composer: `"thinframe/http":"@stable"`
* via Composer: `"thinframe/http":"0.3.*"`


##Copyright
Expand Down
10 changes: 8 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@
"role": "Developer"
}
],
"minimum-stability": "stable",
"minimum-stability": "dev",
"require": {
"php": ">=5.4.0",
"thinframe/foundation": "@stable"
"thinframe/foundation": "dev-develop"
},
"autoload": {
"psr-4": {
"ThinFrame\\Http\\": "src/"
}
},
"extra": {
"branch-alias": {
"dev-master": "0.2-dev",
"dev-develop": "0.3-dev"
}
}
}
35 changes: 18 additions & 17 deletions composer.lock

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

12 changes: 5 additions & 7 deletions src/Constants/Method.php → src/Constant/Method.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<?php

/**
* /src/Constants/Method.php
*
* @copyright 2013 Sorin Badea <sorin.badea91@gmail.com>
* @author Sorin Badea <sorin.badea91@gmail.com>
* @license MIT license (see the license file in the root directory)
*/

namespace ThinFrame\Http\Constants;
namespace ThinFrame\Http\Constant;

use ThinFrame\Foundation\DataTypes\AbstractEnum;
use ThinFrame\Foundation\DataType\AbstractEnum;

/**
* Class Method
* Method
*
* @package ThinFrame\Http\Constants
* @since 0.2
Expand All @@ -27,4 +25,4 @@ final class Method extends AbstractEnum
const PUT = 'put';
const DELETE = 'delete';
const PATCH = 'patch';
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<?php

/**
* /src/Constants/RequestHeader.php
*
* @copyright 2013 Sorin Badea <sorin.badea91@gmail.com>
* @author Sorin Badea <sorin.badea91@gmail.com>
* @license MIT license (see the license file in the root directory)
*/

namespace ThinFrame\Http\Constants;
namespace ThinFrame\Http\Constant;

/**
* Class RequestHeader
* RequestHeader
*
* @package ThinFrame\Http\Constants
* @since 0.2
Expand Down Expand Up @@ -54,4 +52,4 @@ final class RequestHeader
const DNT = 'DNT';
const X_FORWARDED_FOR = 'X-Forwarded-For';
const X_FORWARDED_PROTO = 'X-Forwarded-Proto';
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<?php

/**
* /src/Constants/ResponseHeader.php
*
* @copyright 2013 Sorin Badea <sorin.badea91@gmail.com>
* @author Sorin Badea <sorin.badea91@gmail.com>
* @license MIT license (see the license file in the root directory)
*/

namespace ThinFrame\Http\Constants;
namespace ThinFrame\Http\Constant;

/**
* Class ResponseHeader
* ResponseHeader
*
* @package ThinFrame\Http\Constants
* @since 0.2
Expand Down Expand Up @@ -53,4 +51,4 @@ final class ResponseHeader
const VIA = 'Via';
const WARNING = 'Warning';
const WWW_AUTHENTICATE = 'WWW-Authenticate';
}
}
14 changes: 6 additions & 8 deletions src/Constants/StatusCode.php → src/Constant/StatusCode.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<?php

/**
* /src/Constants/StatusCode.php
*
* @copyright 2013 Sorin Badea <sorin.badea91@gmail.com>
* @author Sorin Badea <sorin.badea91@gmail.com>
* @license MIT license (see the license file in the root directory)
*/

namespace ThinFrame\Http\Constants;
namespace ThinFrame\Http\Constant;

use ThinFrame\Foundation\DataTypes\AbstractEnum;
use ThinFrame\Foundation\Exceptions\InvalidArgumentException;
use ThinFrame\Foundation\DataType\AbstractEnum;
use ThinFrame\Foundation\Exception\InvalidArgumentException;

/**
* Class StatusCode
* StatusCode
*
* @package ThinFrame\Http\Constants
* @since 0.2
Expand Down Expand Up @@ -123,7 +121,7 @@ public function getMessage($protocol = "HTTP/1.1")
* @param string $protocol
*
* @return string
* @throws \ThinFrame\Foundation\Exceptions\InvalidArgumentException
* @throws \ThinFrame\Foundation\Exception\InvalidArgumentException
*/
public static function getMessageFor($statusCode, $protocol = "HTTP/1.1")
{
Expand Down
14 changes: 6 additions & 8 deletions src/Foundation/AbstractRequest.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<?php

/**
* /src/Foundation/AbstractRequest.php
*
* @copyright 2013 Sorin Badea <sorin.badea91@gmail.com>
* @author Sorin Badea <sorin.badea91@gmail.com>
* @license MIT license (see the license file in the root directory)
*/

namespace ThinFrame\Http\Foundation;

use PhpCollection\Map;
use ThinFrame\Http\Constants\Method;
use ThinFrame\Http\Constant\Method;

/**
* Class AbstractRequest
* AbstractRequest
*
* @package ThinFrame\Http\Foundation
* @since 0.2
Expand Down Expand Up @@ -283,13 +281,13 @@ public function getRemoteIp()
/**
* Set remote ip address
*
* @param string $ip
* @param string $ipAddress
*
* @return $this
*/
public function setRemoteIp($ip)
public function setRemoteIp($ipAddress)
{
$this->remoteIp = $ip;
$this->remoteIp = $ipAddress;

return $this;
}
Expand Down
8 changes: 3 additions & 5 deletions src/Foundation/AbstractResponse.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<?php

/**
* /src/Foundation/AbstractResponse.php
*
* @copyright 2013 Sorin Badea <sorin.badea91@gmail.com>
* @author Sorin Badea <sorin.badea91@gmail.com>
* @license MIT license (see the license file in the root directory)
*/

namespace ThinFrame\Http\Foundation;

use PhpCollection\Map;
use ThinFrame\Http\Constants\StatusCode;
use ThinFrame\Http\Constant\StatusCode;

/**
* Class AbstractResponse
* AbstractResponse
*
* @package ThinFrame\Http\Foundation
* @since 0.2
Expand Down
6 changes: 2 additions & 4 deletions src/Foundation/CookieInterface.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<?php

/**
* /src/Foundation/CookieInterface.php
*
* @copyright 2013 Sorin Badea <sorin.badea91@gmail.com>
* @author Sorin Badea <sorin.badea91@gmail.com>
* @license MIT license (see the license file in the root directory)
*/

namespace ThinFrame\Http\Foundation;

/**
* Class CookieInterface
* CookieInterface
*
* @package ThinFrame\Http\Foundation
* @since 0.2
Expand Down
12 changes: 5 additions & 7 deletions src/Foundation/RequestInterface.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<?php

/**
* /src/Foundation/CookieInterface.php
*
* @copyright 2013 Sorin Badea <sorin.badea91@gmail.com>
* @author Sorin Badea <sorin.badea91@gmail.com>
* @license MIT license (see the license file in the root directory)
*/

namespace ThinFrame\Http\Foundation;

use PhpCollection\Map;
use ThinFrame\Http\Constants\Method;
use ThinFrame\Http\Constant\Method;

/**
* Class RequestInterface
* RequestInterface
*
* @package ThinFrame\Http\Foundation
* @since 0.2
Expand Down Expand Up @@ -159,9 +157,9 @@ public function getRemoteIp();
/**
* Set remote ip address
*
* @param string $ip
* @param string $ipAddress
*
* @return $this
*/
public function setRemoteIp($ip);
public function setRemoteIp($ipAddress);
}
Loading