Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor Class Reference

Visits calls to some known translatable exceptions, into the repository_exceptions domain. More...

Inheritance diagram for eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor:

## Public Member Functions
| __construct (DocParser $docParser, FileSourceFactory $fileSourceFactory)
| DefaultPhpFileExtractor constructor. More...
| setLogger (LoggerInterface $logger)
| enterNode (Node $node)
| visitPhpFile (\SplFileInfo $file, MessageCatalogue $catalogue, array $ast)
| beforeTraverse (array $nodes)
| leaveNode (Node $node)
| afterTraverse (array $nodes)
| visitFile (\SplFileInfo $file, MessageCatalogue $catalogue)
| visitTwigFile (\SplFileInfo $file, MessageCatalogue $catalogue, \Twig_Node $ast)

## Protected Attributes
| $defaultDomain = 'repository_exceptions'
| $exceptionsToExtractFrom

## Private Member Functions
| getDocCommentForNode (Node $node)

## Private Attributes
| $fileSourceFactory
| $traverser
| $catalogue
| $file
| $docParser
| $logger
| $previousNode

## Detailed Description

Visits calls to some known translatable exceptions, into the repository_exceptions domain.

Definition at line 29 of file TranslatableExceptionsFileVisitor.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::__construct | ( | DocParser | $docParser,
|  | FileSourceFactory | $fileSourceFactory
| ) |  |

DefaultPhpFileExtractor constructor.

Parameters

  DocParser | $docParser |
  FileSourceFactory | $fileSourceFactory |

Definition at line 71 of file TranslatableExceptionsFileVisitor.php.

References eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\$docParser, and eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\$fileSourceFactory.

## Member Function Documentation

## ◆ afterTraverse()

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::afterTraverse | ( | array | $nodes | ) |

Parameters

  array | $nodes |

Definition at line 178 of file TranslatableExceptionsFileVisitor.php.

## ◆ beforeTraverse()

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::beforeTraverse | ( | array | $nodes | ) |

Parameters

  array | $nodes |

Definition at line 164 of file TranslatableExceptionsFileVisitor.php.

## ◆ enterNode()

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::enterNode | ( | Node | $node | ) |

Parameters

  Node | $node |

Definition at line 90 of file TranslatableExceptionsFileVisitor.php.

References eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\getDocCommentForNode().

## ◆ getDocCommentForNode()

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::getDocCommentForNode | ( | Node | $node | ) |
| private

Parameters

  Node | $node |

Returns
  string|null

Definition at line 204 of file TranslatableExceptionsFileVisitor.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\enterNode().

## ◆ leaveNode()

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::leaveNode | ( | Node | $node | ) |

Parameters

  Node | $node |

Definition at line 171 of file TranslatableExceptionsFileVisitor.php.

## ◆ setLogger()

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::setLogger | ( | LoggerInterface | $logger | ) |

Parameters

  LoggerInterface | $logger |

Definition at line 82 of file TranslatableExceptionsFileVisitor.php.

References eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\$logger.

## ◆ visitFile()

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::visitFile | ( | \SplFileInfo | $file,
|  | MessageCatalogue | $catalogue
| ) |  |

Parameters

  \SplFileInfo | $file |
  MessageCatalogue | $catalogue |

Definition at line 186 of file TranslatableExceptionsFileVisitor.php.

## ◆ visitPhpFile()

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::visitPhpFile | ( | \SplFileInfo | $file,
|  | MessageCatalogue | $catalogue,
|  | array | $ast
| ) |  |

Parameters

  \SplFileInfo | $file |
  MessageCatalogue | $catalogue |
  array | $ast |

Definition at line 154 of file TranslatableExceptionsFileVisitor.php.

References eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\$catalogue, and eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\$file.

## ◆ visitTwigFile()

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::visitTwigFile | ( | \SplFileInfo | $file,
|  | MessageCatalogue | $catalogue,
|  | \Twig_Node | $ast
| ) |  |

Parameters

  \SplFileInfo | $file |
  MessageCatalogue | $catalogue |
  \Twig_Node | $ast |

Definition at line 195 of file TranslatableExceptionsFileVisitor.php.

## Member Data Documentation

## ◆ $catalogue

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::$catalogue
| private

Definition at line 38 of file TranslatableExceptionsFileVisitor.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\visitPhpFile().

## ◆ $defaultDomain

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::$defaultDomain = 'repository_exceptions'
| protected

Definition at line 53 of file TranslatableExceptionsFileVisitor.php.

## ◆ $docParser

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::$docParser
| private

Definition at line 44 of file TranslatableExceptionsFileVisitor.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\__construct().

## ◆ $exceptionsToExtractFrom

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::$exceptionsToExtractFrom
| protected

Initial value:
= [
'contentvalidationexception',
'forbiddenexception',
]

Definition at line 60 of file TranslatableExceptionsFileVisitor.php.

## ◆ $file

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::$file
| private

Definition at line 41 of file TranslatableExceptionsFileVisitor.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\visitPhpFile().

## ◆ $fileSourceFactory

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::$fileSourceFactory
| private

Definition at line 32 of file TranslatableExceptionsFileVisitor.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\__construct().

## ◆ $logger

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::$logger
| private

Definition at line 47 of file TranslatableExceptionsFileVisitor.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor\setLogger().

## ◆ $previousNode

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::$previousNode
| private

Definition at line 50 of file TranslatableExceptionsFileVisitor.php.

## ◆ $traverser

eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor::$traverser
| private

Definition at line 35 of file TranslatableExceptionsFileVisitor.php.

The documentation for this class was generated from the following file:

- TranslatableExceptionsFileVisitor.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.