Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Utils
  • none
  • Tracy
    • Bridges
      • Nette

Classes

  • Callback
  • Configurator
  • Environment
  • Framework
  • FreezableObject
  • Object

Interfaces

  • IFreezable

Exceptions

  • ArgumentOutOfRangeException
  • DeprecatedException
  • DirectoryNotFoundException
  • FileNotFoundException
  • InvalidArgumentException
  • InvalidStateException
  • IOException
  • MemberAccessException
  • NotImplementedException
  • NotSupportedException
  • OutOfRangeException
  • StaticClassException
  • UnexpectedValueException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage
 1: <?php
 2: 
 3: /**
 4:  * This file is part of the Nette Framework (https://nette.org)
 5:  * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 6:  */
 7: 
 8: namespace Nette;
 9: 
10: 
11: /**
12:  * @deprecated
13:  */
14: abstract class FreezableObject extends Object implements IFreezable
15: {
16:     /** @var bool */
17:     private $frozen = FALSE;
18: 
19: 
20:     /**
21:      * Makes the object unmodifiable.
22:      * @return void
23:      */
24:     public function freeze()
25:     {
26:         $this->frozen = TRUE;
27:     }
28: 
29: 
30:     /**
31:      * Is the object unmodifiable?
32:      * @return bool
33:      */
34:     public function isFrozen()
35:     {
36:         return $this->frozen;
37:     }
38: 
39: 
40:     /**
41:      * Creates a modifiable clone of the object.
42:      * @return void
43:      */
44:     public function __clone()
45:     {
46:         $this->frozen = FALSE;
47:     }
48: 
49: 
50:     /**
51:      * @return void
52:      */
53:     protected function updating()
54:     {
55:         if ($this->frozen) {
56:             $class = get_class($this);
57:             throw new InvalidStateException("Cannot modify a frozen object $class.");
58:         }
59:     }
60: 
61: }
62: 
Nette 2.3-20161221 API API documentation generated by ApiGen 2.8.0