Skip to content

Commit

Permalink
rename to full-dev, add forms packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Surkov committed May 12, 2022
1 parent 7f18a0c commit 8518e78
Show file tree
Hide file tree
Showing 31 changed files with 1,102 additions and 15 deletions.
13 changes: 8 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "symbiotic/full",
"name": "symbiotic/full-dev",
"description": "Полная сборка пакетов фреймворка Symbiotic.",
"license": "BSD-3-Clause",
"version": "1.2.12",
"version": "1.3.0",
"authors": [{
"name": "Surkov Sergey",
"role": "creator"
Expand All @@ -22,17 +22,18 @@
"psr/simple-cache": "1.*",
"nyholm/psr7": ">=1.3.2",
"symbiotic/ui_http_kernel": "1.*",
"symbiotic/ui_form": "1.*",
"ext-json": "*"
},
"autoload": {
"psr-4":{
"Symbiotic\\": "src/"
},
"files": [
"src/core_helpers.php",
"src/apps_helpers.php",
"src/settings_helper.php",
"src/http_kernel_helpers.php"
"src/core_helpers.php",
"src/http_kernel_helpers.php",
"src/settings_helper.php"
]
},
"suggest": {
Expand All @@ -52,6 +53,8 @@
"symbiotic/event": "1.*",
"symbiotic/event-contracts": "1.*",
"symbiotic/filesystem": "1.*",
"symbiotic/form-contracts": "1.*",
"symbiotic/form": "1.*",
"symbiotic/http": "1.*",
"symbiotic/http-cookie": "1.*",
"symbiotic/http-kernel": "1.*",
Expand Down
16 changes: 15 additions & 1 deletion src/Auth/AuthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function clearIdentity()
/**
* Returns the identity from storage or null if no identity is available
*
* @return mixed|null
* @return mixed|UserInterface|null
* @throws \Exception
*/
public function getIdentity()
Expand All @@ -164,4 +164,18 @@ public function getIdentity()
}
throw new \Exception('Некорректные данные сессии!');
}

/**
* @param null $fullName
* @param null $id
* @return User
* @todo Надо перенести
*/
public function getGuestUser($fullName = null, $id = null)
{
if(!$fullName) {
$fullName = 'Guest';
}
return new User(UserInterface::GROUP_GUEST, $fullName, $id);
}
}
2 changes: 1 addition & 1 deletion src/Auth/AuthServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function hasIdentity(): bool;
/**
* Returns the authenticated identity or null if no identity is available
*
* @return mixed|null
* @return mixed|null|UserInterface
* @throws
*/
public function getIdentity();
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/UserInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface UserInterface

const GROUP_MANAGER = 1;
//
const GROUP_ADMIN = 69;
const GROUP_ADMIN = 365;

/**
* @return int
Expand Down
1 change: 1 addition & 0 deletions src/Container/BaseContainerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ interface BaseContainerInterface
* Get item by key
*
* @param string $key
* @return mixed|null
*/
public function get(string $key);

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public function then(\Closure $then): void
*
* @todo: Метод используется один раз, нужен ли он?
*/
public function getBasePath($path = '')
public function getBasePath($path = ''):string
{
return $this->base_path . ($path ? \_S\DS . $path : $path);
}
Expand Down
10 changes: 10 additions & 0 deletions src/Core/CoreInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,14 @@ public function then(\Closure $loader):void;
* @used-by Core::run()
*/
public function runNext():void;

/**
* Get the base path of the Laravel installation.
*
* @param string $path Optionally, a path to append to the base path
* @return string
*
* @todo: Метод используется один раз, нужен ли он?
*/
public function getBasePath($path = ''):string;
}
3 changes: 1 addition & 2 deletions src/Core/View/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ function render($template, array $vars = null)
*/
function lang(string $message, array $vars = null, $lang = null): string
{
return $message;
// todo return \_S\lang(appendApp($message),$vars,$lang);
return \_S\lang(appendApp($message), $vars, $lang);
}


Expand Down
17 changes: 17 additions & 0 deletions src/Form/FIelds/Boolean.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Symbiotic\Form\Fields;


/**
* Class Checkbox
* @package Symbiotic\Form
*
*/
class Boolean extends FieldAbstract
{
/**
* @var string
*/
protected string $template = 'fields/boolean';
}
14 changes: 14 additions & 0 deletions src/Form/FIelds/Button.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Symbiotic\Form\Fields;


class Button extends FieldAbstract
{
/**
* @var string
*/
protected string $template = 'fields/button';


}
20 changes: 20 additions & 0 deletions src/Form/FIelds/Checkbox.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Symbiotic\Form\Fields;


/**
* Class Checkbox
* @package Symbiotic\Form
* @method setValue(array $value) : FillableInterface
*/
class Checkbox extends FieldSelectable
{
/**
* @var string
*/
protected string $template = 'fields/checkbox';



}
Loading

0 comments on commit 8518e78

Please sign in to comment.