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.  */
  26.  
  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. {
  39.     /**
  40.      * Initializes the writer to write from the locale $locale.
  41.      *
  42.      * Before starting to writer contexts to the writer, you should call
  43.      * this method to initialize it.
  44.      *
  45.      * @param string $locale 
  46.      * @throws TranslationException when the path of the translation and the
  47.      *                               translation format are not set before this
  48.      *                               method is called.
  49.      * @return void 
  50.      */
  51.     public function initWriter$locale );
  52.  
  53.     /**
  54.      * Deinitializes the writer
  55.      *
  56.      * This method should be called after the last context was written to
  57.      * cleanup resources.
  58.      *
  59.      * @throws TranslationException when the writer is not initialized with
  60.      *                               initWriter().
  61.      * @return void 
  62.      */
  63.     public function deinitWriter();
  64.  
  65.     /**
  66.      * Stores the context named $context with the data $data.
  67.      *
  68.      * $data must contain the translations data map.
  69.      * This method stores the context that it received to the backend specified
  70.      * storage place.
  71.      *
  72.      * @throws TranslationException when the writer is not initialized with
  73.      *                               initWriter().
  74.      * @param string $context 
  75.      * @param array  $data 
  76.      * @return void 
  77.      */
  78.     public function storeContext$contextarray $data );
  79. }
  80. ?>
Documentation generated by phpDocumentor 1.4.3