Skip to content

Commit f3915ee

Browse files
committed
Несколько новых фасадов.
1 parent 43a2d8a commit f3915ee

File tree

4 files changed

+100
-0
lines changed

4 files changed

+100
-0
lines changed

Resources/config/facades.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ services:
1919
Prokl\BitrixOrdinaryToolsBundle\Services\Facades\HLIblockFacade: ~
2020
Prokl\BitrixOrdinaryToolsBundle\Services\Facades\IblockElementFacade: ~
2121
Prokl\BitrixOrdinaryToolsBundle\Services\Facades\ComponentEventDispatcherFacade: ~
22+
Prokl\BitrixOrdinaryToolsBundle\Services\Facades\Application: ~
23+
Prokl\BitrixOrdinaryToolsBundle\Services\Facades\CMain: ~
24+
Prokl\BitrixOrdinaryToolsBundle\Services\Facades\CUser: ~
2225

Services/Facades/Application.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace Prokl\BitrixOrdinaryToolsBundle\Services\Facades;
4+
5+
use Prokl\FacadeBundle\Services\AbstractFacade;
6+
7+
/**
8+
* Class Application
9+
* @package Prokl\BitrixOrdinaryToolsBundle\Services\Facades
10+
*
11+
* @method static addBackgroundJob(callable $job, array $args = [], int $priority = 0)
12+
* @method static getContext()
13+
* @method static getCache()
14+
* @method static getConnection(string $name = '')
15+
* @method static null|string getDocumentRoot()
16+
* @method static getInstance()
17+
* @method static setContext(\Bitrix\Main\Context $context)
18+
*/
19+
class Application extends AbstractFacade
20+
{
21+
/**
22+
* @inheritDoc
23+
*/
24+
protected static function getFacadeAccessor() : string
25+
{
26+
return 'Bitrix\Main\Application';
27+
}
28+
}

Services/Facades/CMain.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace Prokl\BitrixOrdinaryToolsBundle\Services\Facades;
4+
5+
use Prokl\FacadeBundle\Services\AbstractFacade;
6+
7+
/**
8+
* Class CMain
9+
* @package Prokl\BitrixOrdinaryToolsBundle\Services\Facades
10+
*
11+
* @method static addBackgroundJob(callable $job, array $args = [], int $priority = 0)
12+
* @method static getContext()
13+
* @method static getCache()
14+
* @method static getConnection(string $name = '')
15+
* @method static null|string getDocumentRoot()
16+
* @method static getInstance()
17+
* @method static setContext(\Bitrix\Main\Context $context)
18+
*/
19+
class CMain extends AbstractFacade
20+
{
21+
/**
22+
* @inheritDoc
23+
*/
24+
protected static function getFacadeAccessor() : string
25+
{
26+
return 'CMain';
27+
}
28+
}

Services/Facades/CUser.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
namespace Prokl\BitrixOrdinaryToolsBundle\Services\Facades;
4+
5+
use Prokl\FacadeBundle\Services\AbstractFacade;
6+
7+
/**
8+
* Class CUser
9+
* @package Local\Guta\Facades
10+
*
11+
* @method static int|false Add(array $fields)
12+
* @method static bool Authorize(int $userId, bool $save = false, bool $update = true)
13+
* @method static Delete(int $id)
14+
* @method static GetByID(int $id)
15+
* @method static GetByLogin(string $login)
16+
* @method static string GetEmail()
17+
* @method static string GetFirstName()
18+
* @method static string GetFullName()
19+
* @method static int GetID()
20+
* @method static string GetLastName()
21+
* @method static array GetUserGroup(int $id)
22+
* @method static array GetUserGroupArray()
23+
* @method static bool IsAdmin()
24+
* @method static bool IsAuthorized()
25+
* @method static void Logout()
26+
* @method static mixed Login(string $login, string $password, string $remember = "N", string $password_original = "Y")
27+
* @method static bool Update(int $id, array $fields, string $authActions = true)
28+
* @method static void SetUserGroup(int $userId, array $groups)
29+
* @method static void SetUserGroupArray(array $groups)
30+
* @method static void SavePasswordHash()
31+
*/
32+
class CUser extends AbstractFacade
33+
{
34+
/**
35+
* @inheritDoc
36+
*/
37+
protected static function getFacadeAccessor() : string
38+
{
39+
return 'CUser';
40+
}
41+
}

0 commit comments

Comments
 (0)