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

  • ActiveRecord
  • Cache
  • Configs
  • Core
  • DateTime
  • Debug
  • DeleteOperation
  • Errors
  • Event
  • EventHook
  • Events
  • FileCache
  • FormattedString
  • Helpers
  • I18n
  • Image
  • Inflections
  • Inflector
  • Models
  • Module
  • Modules
  • Object
  • Operation
  • PingOperation
  • Prototype
  • Route
  • Routes
  • SaveOperation
  • Session
  • TimeZone
  • TimeZoneLocation
  • Uploaded
  • Vars
  • VarsIterator

Interfaces

  • StorageInterface
  • ToArray
  • ToArrayRecursive

Traits

  • PrototypeTrait
  • ToArrayRecursiveTrait

Exceptions

  • AlreadyAuthenticated
  • AuthenticationRequired
  • Exception
  • ModuleConstructorMissing
  • ModuleIsDisabled
  • ModuleNotDefined
  • OffsetError
  • OffsetNotDefined
  • OffsetNotReadable
  • OffsetNotWritable
  • PermissionRequired
  • PropertyError
  • PropertyIsReserved
  • PropertyNotDefined
  • PropertyNotReadable
  • PropertyNotWritable
  • RouteNotDefined
  • SecurityException

Constants

  • TOKEN_ALPHA
  • TOKEN_ALPHA_UPCASE
  • TOKEN_NUMERIC
  • TOKEN_SYMBOL
  • TOKEN_SYMBOL_WIDE

Functions

  • array_flatten
  • array_insert
  • array_merge_recursive
  • camelize
  • capitalize
  • downcase
  • dump
  • escape
  • escape_all
  • exact_array_merge_recursive
  • excerpt
  • format
  • generate_token
  • generate_token_wide
  • generate_v4_uuid
  • get_autoconfig
  • humanize
  • hyphenate
  • log
  • log_error
  • log_info
  • log_success
  • log_time
  • normalize
  • normalize_namespace_part
  • normalize_url_path
  • pbkdf2
  • pluralize
  • remove_accents
  • shorten
  • singularize
  • sort_by_weight
  • stable_sort
  • strip_root
  • titleize
  • unaccent_compare
  • unaccent_compare_ci
  • underscore
  • upcase
  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;
 13 
 14 /**
 15  * Exception thrown when there is something wrong with an array offset.
 16  *
 17  * This is the base class for offset exceptions, one should rather use the
 18  * {@link OffsetNotReadable} or {@link OffsetNotWritable} exceptions.
 19  */
 20 class OffsetError extends \RuntimeException
 21 {
 22 
 23 }
 24 
 25 /**
 26  * Exception thrown when an array offset is not defined.
 27  *
 28  * For example, this could be triggered by an offset out of bounds while setting an array value.
 29  */
 30 class OffsetNotDefined extends OffsetError
 31 {
 32     public function __construct($message, $code=500, \Exception $previous=null)
 33     {
 34         if (is_array($message))
 35         {
 36             list($offset, $container) = $message + array(1 => null);
 37 
 38             if (is_object($container))
 39             {
 40                 $message = format
 41                 (
 42                     'Undefined offset %offset for object of class %class.', array
 43                     (
 44                         '%offset' => $offset,
 45                         '%class' => get_class($container)
 46                     )
 47                 );
 48             }
 49             else if (is_array($container))
 50             {
 51                 $message = format
 52                 (
 53                     'Undefined offset %offset for the array: !array', array
 54                     (
 55                         '%offset' => $offset,
 56                         '!array' => $container
 57                     )
 58                 );
 59             }
 60             else
 61             {
 62                 $message = format
 63                 (
 64                     'Undefined offset %offset.', array
 65                     (
 66                         '%offset' => $offset
 67                     )
 68                 );
 69             }
 70         }
 71 
 72         parent::__construct($message, $code, $previous);
 73     }
 74 }
 75 
 76 /**
 77  * Exception thrown when an array offset is not readable.
 78  */
 79 class OffsetNotReadable extends OffsetError
 80 {
 81     public function __construct($message, $code=500, \Exception $previous=null)
 82     {
 83         if (is_array($message))
 84         {
 85             list($offset, $container) = $message + array(1 => null);
 86 
 87             if (is_object($container))
 88             {
 89                 $message = format
 90                 (
 91                     'The offset %offset for object of class %class is not readable.', array
 92                     (
 93                         'offset' => $offset,
 94                         'class' => get_class($container)
 95                     )
 96                 );
 97             }
 98             else if (is_array($container))
 99             {
100                 $message = format
101                 (
102                     'The offset %offset is not readable for the array: !array', array
103                     (
104                         'offset' => $offset,
105                         'array' => $container
106                     )
107                 );
108             }
109             else
110             {
111                 $message = format
112                 (
113                     'The offset %offset is not readable.', array
114                     (
115                         'offset' => $offset
116                     )
117                 );
118             }
119         }
120 
121         parent::__construct($message, $code, $previous);
122     }
123 }
124 
125 /**
126  * Exception thrown when an array offset is not writable.
127  */
128 class OffsetNotWritable extends OffsetError
129 {
130     public function __construct($message, $code=500, \Exception $previous=null)
131     {
132         if (is_array($message))
133         {
134             list($offset, $container) = $message + array(1 => null);
135 
136             if (is_object($container))
137             {
138                 $message = format
139                 (
140                     'The offset %offset for object of class %class is not writable.', array
141                     (
142                         'offset' => $offset,
143                         'class' => get_class($container)
144                     )
145                 );
146             }
147             else if (is_array($container))
148             {
149                 $message = format
150                 (
151                     'The offset %offset is not writable for the array: !array', array
152                     (
153                         'offset' => $offset,
154                         'array' => $container
155                     )
156                 );
157             }
158             else
159             {
160                 $message = format
161                 (
162                     'The offset %offset is not writable.', array
163                     (
164                         'offset' => $offset
165                     )
166                 );
167             }
168         }
169 
170         parent::__construct($message, $code, $previous);
171     }
172 }
173 
174 /**
175  * Exception thrown when there is something wrong with an object property.
176  *
177  * This is the base class for property exceptions, one should rather use the
178  * {@link PropertyNotDefined}, {@link PropertyNotReadable} or {@link PropertyNotWritable}
179  * exceptions.
180  */
181 class PropertyError extends \RuntimeException
182 {
183 
184 }
185 
186 /**
187  * Exception thrown when a property is not defined.
188  *
189  * For example, this could be triggered by getting the value of an undefined property.
190  */
191 class PropertyNotDefined extends PropertyError
192 {
193     public function __construct($message, $code=500, \Exception $previous=null)
194     {
195         if (is_array($message))
196         {
197             list($property, $container) = $message + array(1 => null);
198 
199             if (is_object($container))
200             {
201                 $message = format
202                 (
203                     'Undefined property %property for object of class %class.', array
204                     (
205                         '%property' => $property,
206                         '%class' => get_class($container)
207                     )
208                 );
209             }
210             else
211             {
212                 $message = format
213                 (
214                     'Undefined property %property.', array
215                     (
216                         '%property' => $property
217                     )
218                 );
219             }
220         }
221 
222         parent::__construct($message, $code, $previous);
223     }
224 }
225 
226 /**
227  * Exception thrown when a property is not readable.
228  *
229  * For example, this could be triggered when a private property is read from a public scope.
230  */
231 class PropertyNotReadable extends PropertyError
232 {
233     public function __construct($message, $code=500, \Exception $previous=null)
234     {
235         if (is_array($message))
236         {
237             list($property, $container) = $message + array(1 => null);
238 
239             if (is_object($container))
240             {
241                 $message = format
242                 (
243                     'The property %property for object of class %class is not readable.', array
244                     (
245                         '%property' => $property,
246                         '%class' => get_class($container)
247                     )
248                 );
249             }
250             else
251             {
252                 $message = format
253                 (
254                     'The property %property is not readable.', array
255                     (
256                         '%property' => $property
257                     )
258                 );
259             }
260         }
261 
262         parent::__construct($message, $code, $previous);
263     }
264 }
265 
266 /**
267  * Exception thrown when a property is not writable.
268  *
269  * For example, this could be triggered when a private property is written from a public scope.
270  */
271 class PropertyNotWritable extends PropertyError
272 {
273     public function __construct($message, $code=500, \Exception $previous=null)
274     {
275         if (is_array($message))
276         {
277             list($property, $container) = $message + array(1 => null);
278 
279             if (is_object($container))
280             {
281                 $message = format
282                 (
283                     'The property %property for object of class %class is not writable.', array
284                     (
285                         '%property' => $property,
286                         '%class' => get_class($container)
287                     )
288                 );
289             }
290             else
291             {
292                 $message = format
293                 (
294                     'The property %property is not writable.', array
295                     (
296                         '%property' => $property
297                     )
298                 );
299             }
300         }
301 
302         parent::__construct($message, $code, $previous);
303     }
304 }
305 
306 /**
307  * Exception thrown when a property has a reserved name.
308  *
309  * @property-read string $property Name of the reserved property.
310  */
311 class PropertyIsReserved extends PropertyError
312 {
313     private $property;
314 
315     public function __construct($property, $code=500, \Exception $previous=null)
316     {
317         $this->property = $property;
318 
319         parent::__construct(format('Property %property is reserved.', array('%property' => $property)), $code, $previous);
320     }
321 
322     public function __get($property)
323     {
324         if ($property === 'property')
325         {
326             return $this->property;
327         }
328 
329         throw new PropertyNotDefined(array($property, $this));
330     }
331 }
Autodoc API documentation generated by ApiGen 2.8.0