Apache Zeta Components Manual :: File Source for translation_data.php

Source for file translation_data.php

Documentation is available at translation_data.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.  * A container to store one translatable string.
  29.  *
  30.  * This struct is used in various classes to store the data accompanying one
  31.  * translatable string.
  32.  *
  33.  * @package Translation
  34.  * @version //autogentag//
  35.  */
  36. {
  37.     /**
  38.      * Used when the translated string is up-to-date
  39.      */
  40.     const TRANSLATED = 0;
  41.  
  42.     /**
  43.      * Used when a translated string has not been translated yet.
  44.      */
  45.     const UNFINISHED = 1;
  46.  
  47.     /**
  48.      * Used when a translated string is obsolete.
  49.      */
  50.     const OBSOLETE = 2;
  51.  
  52.     /**
  53.      * The original untranslated source string.
  54.      *
  55.      * @var string 
  56.      */
  57.     public $original;
  58.  
  59.     /**
  60.      * The translated string.
  61.      *
  62.      * @var string 
  63.      */
  64.     public $translation;
  65.  
  66.     /**
  67.      * Comment about the translation.
  68.      *
  69.      * @var string 
  70.      */
  71.     public $comment;
  72.  
  73.     /**
  74.      * The status, which is one of the three constants TRANSLATED, UNFINISHED or OBSOLETE.
  75.      *
  76.      * @var integer 
  77.      */
  78.     public $status;
  79.  
  80.     /**
  81.      * The filename the string was found in
  82.      *
  83.      * @var string 
  84.      */
  85.     public $filename;
  86.  
  87.     /**
  88.      * The line where the string is
  89.      *
  90.      * @var integer 
  91.      */
  92.     public $line;
  93.  
  94.     /**
  95.      * The column where the string is
  96.      *
  97.      * @var integer 
  98.      */
  99.     public $column;
  100.  
  101.     /**
  102.      * Constructs an ezcTranslationData object.
  103.      *
  104.      * @param string $original 
  105.      * @param string $translation 
  106.      * @param string $comment 
  107.      * @param int $status 
  108.      * @param string $filename 
  109.      * @param int $line 
  110.      * @param int $column 
  111.      */
  112.     function __construct$original$translation$comment$status$filename null$line null$column null )
  113.     {
  114.         $this->original = $original;
  115.         $this->translation = $translation;
  116.         $this->comment = $comment;
  117.         $this->status = $status;
  118.         $this->filename = $filename;
  119.         $this->line = $line;
  120.         $this->column = $column;
  121.     }
  122.  
  123.     /**
  124.      * Returns a new instance of this class with the data specified by $array.
  125.      *
  126.      * $array contains all the data members of this class in the form:
  127.      * array('member_name'=>value).
  128.      *
  129.      * __set_state makes this class exportable with var_export.
  130.      * var_export() generates code, that calls this method when it
  131.      * is parsed with PHP.
  132.      *
  133.      * @param array(string=>mixed) $array 
  134.      * @return ezcTranslationData 
  135.      * @ignore
  136.      */
  137.     static public function __set_statearray $array )
  138.     {
  139.         return new ezcTranslationData$array['original']$array['translation']$array['comment']$array['status']$array['filename']$array['line']$array['column');
  140.     }
  141. }
  142. ?>
Documentation generated by phpDocumentor 1.4.3