src/FileSystem/Tree.php
public function getLeafObject( string $filepath ) : Leaf
	{
		$leafObject = new $this->leafObjectClass( $this->search, $filepath );

		if ( $leafObject instanceof Leaf )
		{
			return $leafObject;
		}

		throw new \RuntimeException( sprintf( '%s is not a subclass of %s\\Leaf', $this->leafObjectClass, __NAMESPACE__ ) );
	}
public function getLeafObject( string $filepath ) : Leaf
	{
		$leafObject = new $this->leafObjectClass( $this->search, $filepath );

		if ( $leafObject instanceof Leaf )
		{
			return $leafObject;
		}

		throw new \RuntimeException( sprintf( '%s is not a subclass of %s\\Leaf', $this->leafObjectClass, __NAMESPACE__ ) );
	}
public function getLeafObject ( string $ filepath ) : Leaf { $ leafObject = new $ this -> leafObjectClass ( $ this -> search , $ filepath ) ; if ( $ leafObject instanceof Leaf ) { return $ leafObject ; } throw new \ RuntimeException ( sprintf ( '%s is not a subclass of %s\\Leaf' , $ this -> leafObjectClass , __NAMESPACE__ ) ) ; }
Return a new leaf object

@param string $filepath

@throws \RuntimeException
@return Leaf
Return a new leaf object