getUsers() public method

Get the users
public getUsers ( ) : string[]
return string[]
Esempio n. 1
0
File: XML.php Progetto: imbo/imbo
    /**
     * {@inheritdoc}
     */
    public function formatAccessRule(Model\AccessRule $model)
    {
        $rule = $this->formatAccessRuleArray(['id' => $model->getId(), 'users' => $model->getUsers(), 'group' => $model->getGroup(), 'resources' => $model->getResources()]);
        return <<<RULE
<?xml version="1.0" encoding="UTF-8"?>
<imbo>
  {$rule}
</imbo>
RULE;
    }
Esempio n. 2
0
 /**
  * @covers Imbo\Model\AccessRule::getUsers
  * @covers Imbo\Model\AccessRule::setUsers
  */
 public function testSetAndGetUsers()
 {
     $this->assertSame([], $this->model->getUsers());
     $this->assertSame($this->model, $this->model->setUsers(['u1', 'u2']));
     $this->assertSame(['u1', 'u2'], $this->model->getUsers());
 }
Esempio n. 3
0
File: JSON.php Progetto: imbo/imbo
 /**
  * {@inheritdoc}
  */
 public function formatAccessRule(Model\AccessRule $model)
 {
     $data = ['id' => $model->getId(), 'users' => $model->getUsers()];
     if ($group = $model->getGroup()) {
         $data['group'] = $group;
     }
     if ($resources = $model->getResources()) {
         $data['resources'] = $resources;
     }
     return $this->encode($data);
 }