AssetManager\Resolver\PathStackResolver::addPath PHP Method

addPath() public method

Add a single path to the stack
public addPath ( string $path )
$path string
    public function addPath($path)
    {
        if (!is_string($path)) {
            throw new Exception\InvalidArgumentException(sprintf('Invalid path provided; must be a string, received %s', gettype($path)));
        }
        $this->paths[] = $this->normalizePath($path);
    }

Usage Example

Exemplo n.º 1
0
 public function testWillRefuseInvalidPath()
 {
     $resolver = new PathStackResolver();
     $this->setExpectedException('AssetManager\\Exception\\InvalidArgumentException');
     $resolver->addPath(null);
 }
All Usage Examples Of AssetManager\Resolver\PathStackResolver::addPath