Dependencies

This commit is contained in:
2021-03-25 21:23:29 -03:00
parent 15e1eecc76
commit 5e0e7d1d55
76 changed files with 1687 additions and 0 deletions

11
aldarien/session/.gitignore vendored Normal file
View File

@ -0,0 +1,11 @@
composer.phar
/vendor/
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
# Eclipse IDE
.settings
.buildpath
.project

21
aldarien/session/LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Aldarien
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.

View File

@ -0,0 +1,2 @@
# session
Session wrapper for aura/session

View File

@ -0,0 +1,29 @@
<?php
namespace App\Contract;
use Aura\Session\SessionFactory;
use App\Definition\Contract;
class Session
{
use Contract;
protected static function newInstance()
{
$session_factory = new SessionFactory();
return $session_factory->newInstance($_COOKIE);
}
public static function get($segment, $name)
{
$instance = self::getInstance();
$segment = $instance->getSegment($segment);
return $segment->get($name);
}
public static function set($segment, $name, $value)
{
$instance = self::getInstance();
$segment = $instance->getSegment($segment);
$segment->set($name, $value);
}
}
?>

View File

@ -0,0 +1,24 @@
{
"name": "aldarien/session",
"description": "Session wrapper for aura/session",
"type": "library",
"require": {
"aura/session": "^2.1",
"aldarien/contract": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "^6.3"
},
"license": "MIT",
"authors": [
{
"name": "Aldarien",
"email": "aldarien85@gmail.com"
}
],
"autoload": {
"psr-4": {
"App\\": "app"
}
}
}