StackFormation\Stack::getTag PHP Метод

getTag() публичный Метод

public getTag ( $key )
    public function getTag($key)
    {
        $tags = $this->getTags();
        if (!isset($tags[$key])) {
            throw new TagNotFoundException("Tag '{$key}' not found in stack '{$this->getName()}'");
        }
        return $tags[$key];
    }

Usage Example

Пример #1
0
 public function testTagThatDoesntExist()
 {
     $this->setExpectedException('Exception', "Tag 'DoesNotExist' not found in stack 'test-stack1'");
     $this->stack->getTag('DoesNotExist');
 }