Skip to content

Commit

Permalink
Merge pull request #31 from ruudboon/4.x
Browse files Browse the repository at this point in the history
Updated stubs to RC.3
  • Loading branch information
ruudboon authored Nov 18, 2019
2 parents e21e477 + f1e00c4 commit 51c9b7c
Show file tree
Hide file tree
Showing 531 changed files with 5,945 additions and 1,740 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl\Adapter;

use Phalcon\Events\ManagerInterface;
Expand Down Expand Up @@ -94,7 +101,7 @@ public function getDefaultAction(): int
/**
* Returns the internal event manager
*
* @return \Phalcon\Events\ManagerInterface
* @return ManagerInterface
*/
public function getEventsManager(): ManagerInterface
{
Expand All @@ -104,6 +111,7 @@ public function getEventsManager(): ManagerInterface
* Sets the default access level (Phalcon\Acl::ALLOW or Phalcon\Acl::DENY)
*
* @param int $defaultAccess
* @return void
*/
public function setDefaultAction(int $defaultAccess)
{
Expand All @@ -113,6 +121,7 @@ public function setDefaultAction(int $defaultAccess)
* Sets the events manager
*
* @param \Phalcon\Events\ManagerInterface $eventsManager
* @return void
*/
public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl\Adapter;

/**
Expand Down Expand Up @@ -55,6 +62,7 @@ public function addComponentAccess(string $componentName, $accessList): bool;
* @param string $componentName
* @param mixed $access
* @param mixed $func
* @return void
*/
public function allow(string $roleName, string $componentName, $access, $func = null);

Expand All @@ -65,6 +73,7 @@ public function allow(string $roleName, string $componentName, $access, $func =
* @param string $componentName
* @param mixed $access
* @param mixed $func
* @return void
*/
public function deny(string $roleName, string $componentName, $access, $func = null);

Expand All @@ -73,6 +82,7 @@ public function deny(string $roleName, string $componentName, $access, $func = n
*
* @param string $componentName
* @param mixed $accessList
* @return void
*/
public function dropComponentAccess(string $componentName, $accessList);

Expand Down Expand Up @@ -117,14 +127,14 @@ public function getNoArgumentsDefaultAction(): int;
/**
* Return an array with every role registered in the list
*
* @return array|\Phalcon\Acl\RoleInterface[]
* @return array
*/
public function getRoles(): array;

/**
* Return an array with every component registered in the list
*
* @return array|\Phalcon\Acl\ComponentInterface[]
* @return array
*/
public function getComponents(): array;

Expand Down Expand Up @@ -159,6 +169,7 @@ public function isRole(string $roleName): bool;
* Sets the default access level (Phalcon\Ac\Enuml::ALLOW or Phalcon\Acl\Enum::DENY)
*
* @param int $defaultAccess
* @return void
*/
public function setDefaultAction(int $defaultAccess);

Expand All @@ -168,6 +179,7 @@ public function setDefaultAction(int $defaultAccess);
* accessKey
*
* @param int $defaultAccess
* @return void
*/
public function setNoArgumentsDefaultAction(int $defaultAccess);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl\Adapter;

use Phalcon\Acl\Enum;
Expand Down Expand Up @@ -67,7 +74,7 @@
* }
* ```
*/
class Memory extends AbstractAdapter
class Memory extends \Phalcon\Acl\Adapter\AbstractAdapter
{
/**
* Access
Expand Down Expand Up @@ -298,6 +305,7 @@ public function addRole($role, $accessInherits = null): bool
* @param string $componentName
* @param mixed $access
* @param mixed $func
* @return void
*/
public function allow(string $roleName, string $componentName, $access, $func = null)
{
Expand All @@ -324,6 +332,7 @@ public function allow(string $roleName, string $componentName, $access, $func =
* @param string $componentName
* @param mixed $access
* @param mixed $func
* @return void
*/
public function deny(string $roleName, string $componentName, $access, $func = null)
{
Expand All @@ -334,6 +343,7 @@ public function deny(string $roleName, string $componentName, $access, $func = n
*
* @param string $componentName
* @param mixed $accessList
* @return void
*/
public function dropComponentAccess(string $componentName, $accessList)
{
Expand All @@ -352,7 +362,7 @@ public function getNoArgumentsDefaultAction(): int
/**
* Return an array with every role registered in the list
*
* @return array|\Phalcon\Acl\RoleInterface[]
* @return array
*/
public function getRoles(): array
{
Expand All @@ -361,7 +371,7 @@ public function getRoles(): array
/**
* Return an array with every component registered in the list
*
* @return array|\Phalcon\Acl\ComponentInterface[]
* @return array
*/
public function getComponents(): array
{
Expand Down Expand Up @@ -414,6 +424,7 @@ public function isComponent(string $componentName): bool
* accessKey
*
* @param int $defaultAccess
* @return void
*/
public function setNoArgumentsDefaultAction(int $defaultAccess)
{
Expand All @@ -427,6 +438,7 @@ public function setNoArgumentsDefaultAction(int $defaultAccess)
* @param mixed $access
* @param mixed $action
* @param mixed $func
* @return void
*/
private function allowOrDeny(string $roleName, string $componentName, $access, $action, $func = null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl;

/**
Expand Down
22 changes: 22 additions & 0 deletions src/Phalcon/Acl/Enum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl;

/**
* Constants for Phalcon\Acl\Adapter adapters
*/
class Enum
{

const ALLOW = 1;


const DENY = 0;
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<?php

namespace Phalcon\Factory;

/**
* This file is part of the Phalcon Framework.
/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl;

/**
* Class for exceptions thrown by Phalcon\Acl
*/
class Exception extends \Phalcon\Exception
{

Expand Down
7 changes: 7 additions & 0 deletions src/Phalcon/acl/Role.php → src/Phalcon/Acl/Role.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Acl;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Annotations\Adapter;

use Phalcon\Annotations\Collection;
Expand Down Expand Up @@ -27,7 +34,7 @@ abstract class AbstractAdapter implements \Phalcon\Annotations\Adapter\AdapterIn
* Parses or retrieves all the annotations found in a class
*
* @param mixed $className
* @return \Phalcon\Annotations\Reflection
* @return Reflection
*/
public function get($className): Reflection
{
Expand All @@ -38,7 +45,7 @@ public function get($className): Reflection
*
* @param string $className
* @param string $methodName
* @return \Phalcon\Annotations\Collection
* @return Collection
*/
public function getMethod(string $className, string $methodName): Collection
{
Expand All @@ -59,7 +66,7 @@ public function getMethods(string $className): array
*
* @param string $className
* @param string $propertyName
* @return \Phalcon\Annotations\Collection
* @return Collection
*/
public function getProperty(string $className, string $propertyName): Collection
{
Expand All @@ -78,7 +85,7 @@ public function getProperties(string $className): array
/**
* Returns the annotation reader
*
* @return \Phalcon\Annotations\ReaderInterface
* @return ReaderInterface
*/
public function getReader(): ReaderInterface
{
Expand Down
Loading

0 comments on commit 51c9b7c

Please sign in to comment.