public function allow()
    {
        $roleNames = func_get_args();

        // Flatten array to allow array inputs
        $roleNames = Core::array_flatten($roleNames);

        foreach ($roleNames as $role) {

            if (!in_array($role, $this->allowedRoles)) {
                $this->allowedRoles[] = $role;
            }
        }

        return $this;
    }
public function allow()
    {
        $roleNames = func_get_args();

        // Flatten array to allow array inputs
        $roleNames = Core::array_flatten($roleNames);

        foreach ($roleNames as $role) {

            if (!in_array($role, $this->allowedRoles)) {
                $this->allowedRoles[] = $role;
            }
        }

        return $this;
    }
public function allow ( ) { $ roleNames = func_get_args ( ) ; // Flatten array to allow array inputs $ roleNames = Core :: array_flatten ( $ roleNames ) ; foreach ( $ roleNames as $ role ) { if ( ! in_array ( $ role , $ this -> allowedRoles ) ) { $ this -> allowedRoles [ ] = $ role ; } } return $ this ; }
Allows access to this collection for role with the given names. This can be overwritten on the Endpoint level.

@param ...array $roleNames Names of the roles to allow

@return static
Allows access to this collection for role with the given names . This can be overwritten on the Endpoint level .