2014-07-06 16:31:39 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* This file is part of VFS
|
|
|
|
*
|
2015-07-21 14:17:00 +00:00
|
|
|
* Copyright (c) 2015 Andrew Lawson <http://adlawson.com>
|
2014-07-06 16:31:39 +00:00
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
namespace Vfs\Node\Walker;
|
|
|
|
|
|
|
|
use Vfs\Node\NodeInterface;
|
|
|
|
|
|
|
|
interface NodeWalkerInterface
|
|
|
|
{
|
|
|
|
/**
|
2014-09-06 14:15:08 +00:00
|
|
|
* @param NodeInterface $root
|
|
|
|
* @param string $path
|
2014-07-06 16:31:39 +00:00
|
|
|
* @return NodeInterface
|
|
|
|
*/
|
|
|
|
public function findNode(NodeInterface $root, $path);
|
2015-07-21 14:09:37 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param NodeInterface $root
|
|
|
|
* @param string $path
|
|
|
|
* @param callable $fn
|
|
|
|
* @return NodeInterface
|
|
|
|
*/
|
|
|
|
public function walkPath(NodeInterface $root, $path, callable $fn);
|
2014-07-06 16:31:39 +00:00
|
|
|
}
|