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
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
      • Traits
    • Reflection
    • Security
    • Tokenizer
    • Utils
  • Tracy
    • Bridges
      • Nette
  • none

Classes

  • ClassType
  • Closure
  • Constant
  • Factory
  • GlobalFunction
  • Helpers
  • Method
  • Parameter
  • PhpFile
  • PhpLiteral
  • PhpNamespace
  • Property
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
 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\PhpGenerator;
 9: 
10: use Nette;
11: 
12: 
13: /**
14:  * Class property description.
15:  */
16: class Property
17: {
18:     use Nette\SmartObject;
19:     use Traits\NameAware;
20:     use Traits\VisibilityAware;
21:     use Traits\CommentAware;
22: 
23:     /** @var mixed */
24:     public $value;
25: 
26:     /** @var bool */
27:     private $static = false;
28: 
29: 
30:     /**
31:      * @deprecated
32:      * @return static
33:      */
34:     public static function from(\ReflectionProperty $from)
35:     {
36:         trigger_error(__METHOD__ . '() is deprecated, use Nette\PhpGenerator\Factory.', E_USER_DEPRECATED);
37:         return (new Factory)->fromPropertyReflection($from);
38:     }
39: 
40: 
41:     /**
42:      * @return static
43:      */
44:     public function setValue($val)
45:     {
46:         $this->value = $val;
47:         return $this;
48:     }
49: 
50: 
51:     /**
52:      * @return mixed
53:      */
54:     public function getValue()
55:     {
56:         return $this->value;
57:     }
58: 
59: 
60:     /**
61:      * @param  bool
62:      * @return static
63:      */
64:     public function setStatic($state = true)
65:     {
66:         $this->static = (bool) $state;
67:         return $this;
68:     }
69: 
70: 
71:     /**
72:      * @return bool
73:      */
74:     public function isStatic()
75:     {
76:         return $this->static;
77:     }
78: }
79: 
Nette 2.4-20180918 API API documentation generated by ApiGen 2.8.0