## Apache Zeta Components Manual :: File Source for context_write_interface.php

## Source for file context_write_interface.php

Documentation is available at context_write_interface.php

1. <?php
2. /**
3. *
4. * Licensed to the Apache Software Foundation (ASF) under one
5. * or more contributor license agreements. See the NOTICE file
6. * distributed with this work for additional information
7. * regarding copyright ownership. The ASF licenses this file
8. * to you under the Apache License, Version 2.0 (the
9. * "License"); you may not use this file except in compliance
10. * with the License. You may obtain a copy of the License at
11. *
12. * http://www.apache.org/licenses/LICENSE-2.0
13. *
14. * Unless required by applicable law or agreed to in writing,
15. * software distributed under the License is distributed on an
16. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17. * KIND, either express or implied. See the License for the
18. * specific language governing permissions and limitations
19. * under the License.
20. *
21. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
22. * @version //autogentag//
23. * @filesource
24. * @package Translation
25. */
27. /**
28. * Common interface for all context writers.
29. *
30. * This interface specifies the methods that a backend should implement if it
31. * wants to act as a general purpose translation context writer.
32. *
33. * For an example see {@link ezcTranslationCacheBackend}.
34. *
35. * @package Translation
36. * @version //autogentag//
37. */
38. interface ezcTranslationContextWrite
39. {
40. /**
41. * Initializes the writer to write from the locale $locale.
42. *
43. * Before starting to writer contexts to the writer, you should call
44. * this method to initialize it.
45. *
46. * @param string $locale
47. * @throws TranslationException when the path of the translation and the
48. * translation format are not set before this
49. * method is called.
50. * @return void
51. */
52. public function initWriter ( $locale );
54. /**
55. * Deinitializes the writer
56. *
57. * This method should be called after the last context was written to
58. * cleanup resources.
59. *
60. * @throws TranslationException when the writer is not initialized with
61. * initWriter().
62. * @return void
63. */
64. public function deinitWriter ();
66. /**
67. * Stores the context named $context with the data $data.
68. *
69. * $data must contain the translations data map.
70. * This method stores the context that it received to the backend specified
71. * storage place.
72. *
73. * @throws TranslationException when the writer is not initialized with
74. * initWriter().
75. * @param string $context
76. * @param array $data
77. * @return void
78. */
79. public function storeContext ( $context, array $data );
80. }
81. ?>

Documentation generated by phpDocumentor 1.4.3