protected function defineBladeExtensions()
    {
        foreach ($this->app->tagged('blade.extension') as $extension) {
            if (! $extension instanceof BladeExtension) {
                throw new InvalidBladeExtension($extension);
            }

            foreach ($extension->getDirectives() as $name => $callable) {
                $this->app['blade.compiler']->directive($name, $callable);
            }

            foreach ($extension->getConditionals() as $name => $callable) {
                $this->app['blade.compiler']->if($name, $callable);
            }
        }
    }