Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • Calendar
  • CalendarCollection
  • DateFormatter
  • DateTimeFormatter
  • FileCache
  • Locale
  • LocaleCollection
  • LocalizedDateTime
  • LocalizedObject
  • Provider
  • Repository
  • Retriever
  • RunTimeCache
  • Supplemental
  • TimeFormatter

Interfaces

  • Cache

Exceptions

  • ResourceNotFound
 1 <?php
 2 
 3 /*
 4  * This file is part of the ICanBoogie package.
 5  *
 6  * (c) Olivier Laviale <olivier.laviale@gmail.com>
 7  *
 8  * For the full copyright and license information, please view the LICENSE
 9  * file that was distributed with this source code.
10  */
11 
12 namespace ICanBoogie\CLDR;
13 
14 use ICanBoogie\OffsetNotWritable;
15 
16 /**
17  * Representation of a locale collection.
18  */
19 class LocaleCollection implements \ArrayAccess
20 {
21     /**
22      * Representation of a CLDR.
23      *
24      * @var Repository
25      */
26     protected $repository;
27 
28     /**
29      * Locale instances.
30      *
31      * @var Locale[]
32      */
33     protected $collection = array();
34 
35     /**
36      * Initialiazes the {@link $repository} property.
37      *
38      * @param Repository $repository Representation of a CLDR.
39      */
40     public function __construct(Repository $repository)
41     {
42         $this->repository = $repository;
43     }
44 
45     public function offsetExists($offset)
46     {
47         throw new \BadMethodCallException("The method is not implemented");
48     }
49 
50     public function offsetGet($offset)
51     {
52         if (empty($this->collection[$offset]))
53         {
54             $this->collection[$offset] = new Locale($this->repository, $offset);
55         }
56 
57         return $this->collection[$offset];
58     }
59 
60     public function offsetSet($offset, $value)
61     {
62         throw new OffsetNotWritable(array($offset, $this));
63     }
64 
65     public function offsetUnset($offset)
66     {
67         throw new OffsetNotWritable(array($offset, $this));
68     }
69 }
Autodoc API documentation generated by ApiGen 2.8.0