Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Commit

Permalink
Updates for Yii 2.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeymakinen committed Oct 21, 2016
1 parent 7f2b1a2 commit 44e5bfb
Show file tree
Hide file tree
Showing 18 changed files with 2,355 additions and 522 deletions.
154 changes: 122 additions & 32 deletions Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* Facades for Yii 2
*
* Generated on Yii 2.0.10
*
* @see https://github.com/sergeymakinen/yii2-facades
* @copyright Copyright (c) 2016 Sergey Makinen (https://makinen.ru)
* @license https://github.com/sergeymakinen/yii2-facades/blob/master/LICENSE The MIT License
Expand All @@ -11,55 +13,143 @@

/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
/**
* Asset facade.
* Yii::$app->get('assetManager') facade.
*
* Facades Yii::$app->get('assetManager') component.
* Methods
*
* @see \yii\web\AssetManager
* @method static \yii\base\Behavior attachBehavior(string $name, string|array|\yii\base\Behavior $behavior) Attaches a behavior to this component.
* @method static attachBehaviors(array $behaviors) Attaches a list of behaviors to the component.
* @see \yii\base\Component::attachBehavior
*
* @method static void attachBehaviors(array $behaviors) Attaches a list of behaviors to the component.
* @see \yii\base\Component::attachBehaviors
*
* @method static array behaviors() Returns a list of behaviors that this component should behave as.
* @see \yii\base\Component::behaviors
*
* @method static null|\yii\base\Behavior detachBehavior(string $name) Detaches a behavior from the component.
* @method static detachBehaviors() Detaches all behaviors from the component.
* @method static ensureBehaviors() Makes sure that the behaviors declared in [[behaviors()]] are attached to this component.
* @see \yii\base\Component::detachBehavior
*
* @method static void detachBehaviors() Detaches all behaviors from the component.
* @see \yii\base\Component::detachBehaviors
*
* @method static void ensureBehaviors() Makes sure that the behaviors declared in [[behaviors()]] are attached to this component.
* @see \yii\base\Component::ensureBehaviors
*
* @method static string|bool getAssetPath(\yii\web\AssetBundle $bundle, string $asset) Returns the actual file path for the specified asset.
* @see \yii\web\AssetManager::getAssetPath
*
* @method static string getAssetUrl(\yii\web\AssetBundle $bundle, string $asset) Returns the actual URL for the specified asset.
* @see \yii\web\AssetManager::getAssetUrl
*
* @method static null|\yii\base\Behavior getBehavior(string $name) Returns the named behavior object.
* @see \yii\base\Component::getBehavior
*
* @method static \yii\base\Behavior[] getBehaviors() Returns all behaviors attached to this component.
* @see \yii\base\Component::getBehaviors
*
* @method static \yii\web\AssetBundle getBundle(string $name, bool $publish = true) Returns the named asset bundle.
* @see \yii\web\AssetManager::getBundle
*
* @method static \yii\web\AssetConverterInterface getConverter() Returns the asset converter.
* @see \yii\web\AssetManager::getConverter
*
* @method static string|bool getPublishedPath(string $path) Returns the published path of a file path.
* @see \yii\web\AssetManager::getPublishedPath
*
* @method static string|bool getPublishedUrl(string $path) Returns the URL of a published file path.
* @see \yii\web\AssetManager::getPublishedUrl
*
* @method static bool hasEventHandlers(string $name) Returns a value indicating whether there is any handler attached to the named event.
* @see \yii\base\Component::hasEventHandlers
*
* @method static bool off(string $name, callable $handler = null) Detaches an existing event handler from this component.
* @see \yii\base\Component::off
*
* @method static void on(string $name, callable $handler, mixed $data = null, bool $append = true) Attaches an event handler to an event.
* @see \yii\base\Component::on
*
* @method static array publish(string $path, array $options = []) Publishes a file or a directory.
* @see \yii\web\AssetManager::publish
*
* @method static void setConverter(array|\yii\web\AssetConverterInterface $value) Sets the asset converter.
* @see \yii\web\AssetManager::setConverter
*
* @method static void trigger(string $name, \yii\base\Event $event = null) Triggers an event.
* @see \yii\base\Component::trigger
*
* Property accessors
*
* @method static callable getAfterCopy() Returns a PHP callback that is called after a sub-directory or file is successfully copied.
* @see \yii\web\AssetManager::afterCopy
*
* @method static bool getAppendTimestamp() Returns whether to append a timestamp to the URL of every published asset.
* @see \yii\web\AssetManager::appendTimestamp
*
* @method static array getAssetMap() Returns mapping from source asset files (keys) to target asset files (values).
* @method static string|bool getAssetPath(\yii\web\AssetBundle $bundle, string $asset) Returns the actual file path for the specified asset.
* @method static string getAssetUrl(\yii\web\AssetBundle $bundle, string $asset) Returns the actual URL for the specified asset.
* @see \yii\web\AssetManager::assetMap
*
* @method static string getBasePath() Returns the root directory storing the published asset files.
* @see \yii\web\AssetManager::basePath
*
* @method static string getBaseUrl() Returns the base URL through which the published asset files can be accessed.
* @see \yii\web\AssetManager::baseUrl
*
* @method static callable getBeforeCopy() Returns a PHP callback that is called before copying each sub-directory or file.
* @method static null|\yii\base\Behavior getBehavior(string $name) Returns the named behavior object.
* @method static \yii\base\Behavior[] getBehaviors() Returns all behaviors attached to this component.
* @method static \yii\web\AssetBundle getBundle(string $name, bool $publish = true) Returns the named asset bundle.
* @see \yii\web\AssetManager::beforeCopy
*
* @method static array|bool getBundles() Returns list of asset bundle configurations.
* @method static \yii\web\AssetConverterInterface getConverter() Returns the asset converter.
* @see \yii\web\AssetManager::bundles
*
* @method static int getDirMode() Returns the permission to be set for newly generated asset directories.
* @see \yii\web\AssetManager::dirMode
*
* @method static int getFileMode() Returns the permission to be set for newly published asset files.
* @see \yii\web\AssetManager::fileMode
*
* @method static bool getForceCopy() Returns whether the directory being published should be copied even if it is found in the target directory.
* @see \yii\web\AssetManager::forceCopy
*
* @method static callable getHashCallback() Returns a callback that will be called to produce hash for asset directory generation.
* @see \yii\web\AssetManager::hashCallback
*
* @method static bool getLinkAssets() Returns whether to use symbolic link to publish asset files.
* @method static string|bool getPublishedPath(string $path) Returns the published path of a file path.
* @method static string|bool getPublishedUrl(string $path) Returns the URL of a published file path.
* @method static bool hasEventHandlers(string $name) Returns a value indicating whether there is any handler attached to the named event.
* @method static bool off(string $name, callable $handler = null) Detaches an existing event handler from this component.
* @method static on(string $name, callable $handler, mixed $data = null, bool $append = true) Attaches an event handler to an event.
* @method static array publish(string $path, array $options = []) Publishes a file or a directory.
* @method static setAfterCopy(callable $value) Sets a PHP callback that is called after a sub-directory or file is successfully copied.
* @method static setAppendTimestamp(bool $value) Sets whether to append a timestamp to the URL of every published asset.
* @method static setAssetMap(array $value) Sets mapping from source asset files (keys) to target asset files (values).
* @method static setBasePath(string $value) Sets the root directory storing the published asset files.
* @method static setBaseUrl(string $value) Sets the base URL through which the published asset files can be accessed.
* @method static setBeforeCopy(callable $value) Sets a PHP callback that is called before copying each sub-directory or file.
* @method static setBundles(array|bool $value) Sets list of asset bundle configurations.
* @method static setConverter(array|\yii\web\AssetConverterInterface $value) Sets the asset converter.
* @method static setDirMode(int $value) Sets the permission to be set for newly generated asset directories.
* @method static setFileMode(int $value) Sets the permission to be set for newly published asset files.
* @method static setForceCopy(bool $value) Sets whether the directory being published should be copied even if it is found in the target directory.
* @method static setHashCallback(callable $value) Sets a callback that will be called to produce hash for asset directory generation.
* @method static setLinkAssets(bool $value) Sets whether to use symbolic link to publish asset files.
* @method static trigger(string $name, \yii\base\Event $event = null) Triggers an event.
* @see \yii\web\AssetManager::linkAssets
*
* @method static void setAfterCopy(callable $value) Sets a PHP callback that is called after a sub-directory or file is successfully copied.
* @see \yii\web\AssetManager::afterCopy
*
* @method static void setAppendTimestamp(bool $value) Sets whether to append a timestamp to the URL of every published asset.
* @see \yii\web\AssetManager::appendTimestamp
*
* @method static void setAssetMap(array $value) Sets mapping from source asset files (keys) to target asset files (values).
* @see \yii\web\AssetManager::assetMap
*
* @method static void setBasePath(string $value) Sets the root directory storing the published asset files.
* @see \yii\web\AssetManager::basePath
*
* @method static void setBaseUrl(string $value) Sets the base URL through which the published asset files can be accessed.
* @see \yii\web\AssetManager::baseUrl
*
* @method static void setBeforeCopy(callable $value) Sets a PHP callback that is called before copying each sub-directory or file.
* @see \yii\web\AssetManager::beforeCopy
*
* @method static void setBundles(array|bool $value) Sets list of asset bundle configurations.
* @see \yii\web\AssetManager::bundles
*
* @method static void setDirMode(int $value) Sets the permission to be set for newly generated asset directories.
* @see \yii\web\AssetManager::dirMode
*
* @method static void setFileMode(int $value) Sets the permission to be set for newly published asset files.
* @see \yii\web\AssetManager::fileMode
*
* @method static void setForceCopy(bool $value) Sets whether the directory being published should be copied even if it is found in the target directory.
* @see \yii\web\AssetManager::forceCopy
*
* @method static void setHashCallback(callable $value) Sets a callback that will be called to produce hash for asset directory generation.
* @see \yii\web\AssetManager::hashCallback
*
* @method static void setLinkAssets(bool $value) Sets whether to use symbolic link to publish asset files.
* @see \yii\web\AssetManager::linkAssets
*/
class Asset extends Facade
{
Expand Down
83 changes: 75 additions & 8 deletions Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/**
* Facades for Yii 2
*
* Generated on Yii 2.0.10
*
* @see https://github.com/sergeymakinen/yii2-facades
* @copyright Copyright (c) 2016 Sergey Makinen (https://makinen.ru)
* @license https://github.com/sergeymakinen/yii2-facades/blob/master/LICENSE The MIT License
Expand All @@ -11,43 +13,108 @@

/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
/**
* Auth facade.
* Yii::$app->get('auth') facade.
*
* Facades Yii::$app->get('auth') component.
* Methods
*
* @see \yii\rbac\ManagerInterface
* @method static bool add(\yii\rbac\Role|\yii\rbac\Permission|\yii\rbac\Rule $object) Adds a role, permission or rule to the RBAC system.
* @see \yii\rbac\ManagerInterface::add
*
* @method static bool addChild(\yii\rbac\Item $parent, \yii\rbac\Item $child) Adds an item as a child of another item.
* @see \yii\rbac\ManagerInterface::addChild
*
* @method static \yii\rbac\Assignment assign(\yii\rbac\Role $role, string|int $userId) Assigns a role to a user.
* @see \yii\rbac\ManagerInterface::assign
*
* @method static bool canAddChild(\yii\rbac\Item $parent, \yii\rbac\Item $child) Checks the possibility of adding a child to parent.
* @see \yii\rbac\ManagerInterface::canAddChild
*
* @method static bool checkAccess(string|int $userId, string $permissionName, array $params = []) Checks if the user has the specified permission.
* @see \yii\rbac\CheckAccessInterface::checkAccess
*
* @method static \yii\rbac\Permission createPermission(string $name) Creates a new Permission object.
* @see \yii\rbac\ManagerInterface::createPermission
*
* @method static \yii\rbac\Role createRole(string $name) Creates a new Role object.
* @see \yii\rbac\ManagerInterface::createRole
*
* @method static null|\yii\rbac\Assignment getAssignment(string $roleName, string|int $userId) Returns the assignment information regarding a role and a user.
* @see \yii\rbac\ManagerInterface::getAssignment
*
* @method static \yii\rbac\Assignment[] getAssignments(string|int $userId) Returns all role assignment information for the specified user.
* @see \yii\rbac\ManagerInterface::getAssignments
*
* @method static \yii\rbac\Role[] getChildRoles(string $roleName) Returns the roles that are adding to the role via [[addChild()]] by recursive.
* @see \yii\rbac\ManagerInterface::getChildRoles
*
* @method static \yii\rbac\Item[] getChildren(string $name) Returns the child permissions and/or roles.
* @see \yii\rbac\ManagerInterface::getChildren
*
* @method static null|\yii\rbac\Permission getPermission(string $name) Returns the named permission.
* @see \yii\rbac\ManagerInterface::getPermission
*
* @method static \yii\rbac\Permission[] getPermissions() Returns all permissions in the system.
* @see \yii\rbac\ManagerInterface::getPermissions
*
* @method static \yii\rbac\Permission[] getPermissionsByRole(string $roleName) Returns all permissions that the specified role represents.
* @see \yii\rbac\ManagerInterface::getPermissionsByRole
*
* @method static \yii\rbac\Permission[] getPermissionsByUser(string|int $userId) Returns all permissions that the user has.
* @see \yii\rbac\ManagerInterface::getPermissionsByUser
*
* @method static null|\yii\rbac\Role getRole(string $name) Returns the named role.
* @see \yii\rbac\ManagerInterface::getRole
*
* @method static \yii\rbac\Role[] getRoles() Returns all roles in the system.
* @see \yii\rbac\ManagerInterface::getRoles
*
* @method static \yii\rbac\Role[] getRolesByUser(string|int $userId) Returns the roles that are assigned to the user via [[assign()]].
* @see \yii\rbac\ManagerInterface::getRolesByUser
*
* @method static null|\yii\rbac\Rule getRule(string $name) Returns the rule of the specified name.
* @see \yii\rbac\ManagerInterface::getRule
*
* @method static \yii\rbac\Rule[] getRules() Returns all rules available in the system.
* @see \yii\rbac\ManagerInterface::getRules
*
* @method static array getUserIdsByRole(string $roleName) Returns all user IDs assigned to the role specified.
* @see \yii\rbac\ManagerInterface::getUserIdsByRole
*
* @method static bool hasChild(\yii\rbac\Item $parent, \yii\rbac\Item $child) Returns a value indicating whether the child already exists for the parent.
* @see \yii\rbac\ManagerInterface::hasChild
*
* @method static bool remove(\yii\rbac\Role|\yii\rbac\Permission|\yii\rbac\Rule $object) Removes a role, permission or rule from the RBAC system.
* @method static removeAll() Removes all authorization data, including roles, permissions, rules, and assignments.
* @method static removeAllAssignments() Removes all role assignments.
* @method static removeAllPermissions() Removes all permissions.
* @method static removeAllRoles() Removes all roles.
* @method static removeAllRules() Removes all rules.
* @see \yii\rbac\ManagerInterface::remove
*
* @method static void removeAll() Removes all authorization data, including roles, permissions, rules, and assignments.
* @see \yii\rbac\ManagerInterface::removeAll
*
* @method static void removeAllAssignments() Removes all role assignments.
* @see \yii\rbac\ManagerInterface::removeAllAssignments
*
* @method static void removeAllPermissions() Removes all permissions.
* @see \yii\rbac\ManagerInterface::removeAllPermissions
*
* @method static void removeAllRoles() Removes all roles.
* @see \yii\rbac\ManagerInterface::removeAllRoles
*
* @method static void removeAllRules() Removes all rules.
* @see \yii\rbac\ManagerInterface::removeAllRules
*
* @method static bool removeChild(\yii\rbac\Item $parent, \yii\rbac\Item $child) Removes a child from its parent.
* @see \yii\rbac\ManagerInterface::removeChild
*
* @method static bool removeChildren(\yii\rbac\Item $parent) Removed all children form their parent.
* @see \yii\rbac\ManagerInterface::removeChildren
*
* @method static bool revoke(\yii\rbac\Role $role, string|int $userId) Revokes a role from a user.
* @see \yii\rbac\ManagerInterface::revoke
*
* @method static bool revokeAll(mixed $userId) Revokes all roles from a user.
* @see \yii\rbac\ManagerInterface::revokeAll
*
* @method static bool update(string $name, \yii\rbac\Role|\yii\rbac\Permission|\yii\rbac\Rule $object) Updates the specified role, permission or rule in the system.
* @see \yii\rbac\ManagerInterface::update
*/
class Auth extends Facade
{
Expand Down
Loading

0 comments on commit 44e5bfb

Please sign in to comment.