getResources() public method

Get the group resources
public getResources ( ) : string[]
return string[]
Exemplo n.º 1
0
Arquivo: XML.php Projeto: imbo/imbo
    /**
     * {@inheritdoc}
     */
    public function formatGroup(Model\Group $model)
    {
        $entries = '';
        foreach ($model->getResources() as $resource) {
            $entries .= '<resource>' . $this->formatValue($resource) . '</resource>';
        }
        return <<<GROUP
<?xml version="1.0" encoding="UTF-8"?>
<imbo>
  <name>{$model->getName()}</name>
  <resources>{$entries}</resources>
</imbo>
GROUP;
    }
Exemplo n.º 2
0
 /**
  * @covers Imbo\Model\Group::getResources
  * @covers Imbo\Model\Group::setResources
  */
 public function testSetAndGetResources()
 {
     $this->assertSame([], $this->model->getResources());
     $this->assertSame($this->model, $this->model->setResources(['image.get', 'image.head']));
     $this->assertSame(['image.get', 'image.head'], $this->model->getResources());
 }
Exemplo n.º 3
0
Arquivo: JSON.php Projeto: imbo/imbo
 /**
  * {@inheritdoc}
  */
 public function formatGroup(Model\Group $model)
 {
     return $this->encode(['name' => $model->getName(), 'resources' => $model->getResources()]);
 }