protected function handleImportLoop($name)
    {
        for ($env = $this->env; $env; $env = $env->parent) {
            $file = $this->sourceNames[$env->block->sourceIndex];

            if (realpath($file) === $name) {
                $this->throwError('An @import loop has been found: %s imports %s', $file, basename($file));
                break;
            }
        }
    }
protected function handleImportLoop($name)
    {
        for ($env = $this->env; $env; $env = $env->parent) {
            $file = $this->sourceNames[$env->block->sourceIndex];

            if (realpath($file) === $name) {
                $this->throwError('An @import loop has been found: %s imports %s', $file, basename($file));
                break;
            }
        }
    }
protected function handleImportLoop ( $ name ) { for ( $ env = $ this -> env ; $ env ; $ env = $ env -> parent ) { $ file = $ this -> sourceNames [ $ env -> block -> sourceIndex ] ; if ( realpath ( $ file ) === $ name ) { $ this -> throwError ( 'An @import loop has been found: %s imports %s' , $ file , basename ( $ file ) ) ; break ; } } }
Handle import loop

@param string $name

@throws \Exception
Handle import loop