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

  • Compiler
  • CompilerExtension
  • Container
  • ContainerBuilder
  • ContainerFactory
  • ContainerLoader
  • ServiceDefinition
  • Statement

Exceptions

  • MissingServiceException
  • ServiceCreationException
  • 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\DI;
 9: 
10: use Nette;
11: 
12: 
13: /**
14:  * Assignment or calling statement.
15:  */
16: class Statement extends Nette\Object
17: {
18:     /** @var string|array|ServiceDefinition|NULL  class|method|$property */
19:     private $entity;
20: 
21:     /** @var array */
22:     public $arguments;
23: 
24: 
25:     /**
26:      * @param  string|array|ServiceDefinition|NULL
27:      */
28:     public function __construct($entity, array $arguments = array())
29:     {
30:         $this->setEntity($entity);
31:         $this->arguments = $arguments;
32:     }
33: 
34: 
35:     /**
36:      * @param  string|array|ServiceDefinition|NULL
37:      * @return static
38:      */
39:     public function setEntity($entity)
40:     {
41:         if (!is_string($entity) && !(is_array($entity) && isset($entity[0], $entity[1]))
42:             && !$entity instanceof ServiceDefinition && $entity !== NULL
43:         ) {
44:             throw new Nette\InvalidArgumentException('Argument is not valid Statement entity.');
45:         }
46:         $this->entity = $entity;
47:         return $this;
48:     }
49: 
50: 
51:     public function getEntity()
52:     {
53:         return $this->entity;
54:     }
55: 
56: }
57: 
Nette 2.3-20161221 API API documentation generated by ApiGen 2.8.0