Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Array
- (
- [type] => 8192
- [message] => Function set_magic_quotes_runtime() is deprecated
- [file] => /hosting/www/stormsoft.cz/dev/libs/Nette/loader.php
- [line] => 18
- )
- Array
- (
- [0] =>
- [1] => <span style="color: #000"><?php
- [2] =>
- [3] => </span><span style="color: #998; font-style: italic">/**
- [4] => * This file is part of the Nette Framework (http://nette.org)
- [5] => *
- [6] => * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
- [7] => *
- [8] => * For the full copyright and license information, please view
- [9] => * the file license.txt that was distributed with this source code.
- [10] => */
- [11] =>
- [12] => </span><span style="color: #D24; font-weight: bold">namespace </span><span style="color: #000">Nette</span><span style="color: #D24; font-weight: bold">;
- [13] =>
- [14] => use </span><span style="color: #000">Nette</span><span style="color: #D24; font-weight: bold">;
- [15] =>
- [16] =>
- [17] =>
- [18] => </span><span style="color: #998; font-style: italic">/**
- [19] => * Nette\Object is the ultimate ancestor of all instantiable classes.
- [20] => *
- [21] => * It defines some handful methods and enhances object core of PHP:
- [22] => * - access to undeclared members throws exceptions
- [23] => * - support for conventional properties with getters and setters
- [24] => * - support for event raising functionality
- [25] => * - ability to add new methods to class (extension methods)
- [26] => *
- [27] => * Properties is a syntactic sugar which allows access public getter and setter
- [28] => * methods as normal object variables. A property is defined by a getter method
- [29] => * or setter method (no setter method means read-only property).
- [30] => * <code>
- [31] => * $val = $obj->label; // equivalent to $val = $obj->getLabel();
- [32] => * $obj->label = 'Nette'; // equivalent to $obj->setLabel('Nette');
- [33] => * </code>
- [34] => * Property names are case-sensitive, and they are written in the camelCaps
- [35] => * or PascalCaps.
- [36] => *
- [37] => * Event functionality is provided by declaration of property named 'on{Something}'
- [38] => * Multiple handlers are allowed.
- [39] => * <code>
- [40] => * public $onClick; // declaration in class
- [41] => * $this->onClick[] = 'callback'; // attaching event handler
- [42] => * if (!empty($this->onClick)) ... // are there any handlers?
- [43] => * $this->onClick($sender, $arg); // raises the event with arguments
- [44] => * </code>
- [45] => *
- [46] => * Adding method to class (i.e. to all instances) works similar to JavaScript
- [47] => * prototype property. The syntax for adding a new method is:
- [48] => * <code>
- [49] => * MyClass::extensionMethod('newMethod', function(MyClass $obj, $arg, ...) { ... });
- [50] => * $obj = new MyClass;
- [51] => * $obj->newMethod($x);
- [52] => * </code>
- [53] => *
- [54] => * @author David Grudl
- [55] => *
- [56] => * @property-read Nette\Reflection\ClassType $reflection
- [57] => */
- [58] => </span><span style="color: #D24; font-weight: bold">abstract class </span><span style="color: #000">Object
- [59] => </span><span style="color: #D24; font-weight: bold">{
- [60] =>
- [61] => </span><span style="color: #998; font-style: italic">/**
- [62] => * Access to reflection.
- [63] => * @return Nette\Reflection\ClassType
- [64] => */
- [65] => </span><span style="color: #D24; font-weight: bold">public static function </span><span style="color: #000">getReflection</span><span style="color: #D24; font-weight: bold">()
- [66] => {
- [67] => return new </span><span style="color: #000">Reflection</span><span style="color: #D24; font-weight: bold">\</span><span style="color: #000">ClassType</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">get_called_class</span><span style="color: #D24; font-weight: bold">());
- [68] => }
- [69] =>
- [70] =>
- [71] =>
- [72] => </span><span style="color: #998; font-style: italic">/**
- [73] => * Call to undefined method.
- [74] => * @param string method name
- [75] => * @param array arguments
- [76] => * @return mixed
- [77] => * @throws MemberAccessException
- [78] => */
- [79] => </span><span style="color: #D24; font-weight: bold">public function </span><span style="color: #000">__call</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$args</span><span style="color: #D24; font-weight: bold">)
- [80] => {
- [81] => return </span><span style="color: #000">ObjectMixin</span><span style="color: #D24; font-weight: bold">::</span><span style="color: #000">call</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$this</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$args</span><span style="color: #D24; font-weight: bold">);
- [82] => }
- [83] =>
- [84] =>
- [85] =>
- [86] => </span><span style="color: #998; font-style: italic">/**
- [87] => * Call to undefined static method.
- [88] => * @param string method name (in lower case!)
- [89] => * @param array arguments
- [90] => * @return mixed
- [91] => * @throws MemberAccessException
- [92] => */
- [93] => </span><span style="color: #D24; font-weight: bold">public static function </span><span style="color: #000">__callStatic</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$args</span><span style="color: #D24; font-weight: bold">)
- [94] => {
- [95] => return </span><span style="color: #000">ObjectMixin</span><span style="color: #D24; font-weight: bold">::</span><span style="color: #000">callStatic</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">get_called_class</span><span style="color: #D24; font-weight: bold">(), </span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$args</span><span style="color: #D24; font-weight: bold">);
- [96] => }
- [97] =>
- [98] =>
- [99] =>
- [100] => </span><span style="color: #998; font-style: italic">/**
- [101] => * Adding method to class.
- [102] => * @param string method name
- [103] => * @param mixed callback or closure
- [104] => * @return mixed
- [105] => */
- [106] => </span><span style="color: #D24; font-weight: bold">public static function </span><span style="color: #000">extensionMethod</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$callback </span><span style="color: #D24; font-weight: bold">= </span><span style="color: #000">NULL</span><span style="color: #D24; font-weight: bold">)
- [107] => {
- [108] => if (</span><span style="color: #000">strpos</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #080">'::'</span><span style="color: #D24; font-weight: bold">) === </span><span style="color: #000">FALSE</span><span style="color: #D24; font-weight: bold">) {
- [109] => </span><span style="color: #000">$class </span><span style="color: #D24; font-weight: bold">= </span><span style="color: #000">get_called_class</span><span style="color: #D24; font-weight: bold">();
- [110] => } else {
- [111] => list(</span><span style="color: #000">$class</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">) = </span><span style="color: #000">explode</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #080">'::'</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">);
- [112] => }
- [113] => </span><span style="color: #000">$class </span><span style="color: #D24; font-weight: bold">= new </span><span style="color: #000">Reflection</span><span style="color: #D24; font-weight: bold">\</span><span style="color: #000">ClassType</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$class</span><span style="color: #D24; font-weight: bold">);
- [114] => if (</span><span style="color: #000">$callback </span><span style="color: #D24; font-weight: bold">=== </span><span style="color: #000">NULL</span><span style="color: #D24; font-weight: bold">) {
- [115] => return </span><span style="color: #000">$class</span><span style="color: #D24; font-weight: bold">-></span><span style="color: #000">getExtensionMethod</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">);
- [116] => } else {
- [117] => </span><span style="color: #000">$class</span><span style="color: #D24; font-weight: bold">-></span><span style="color: #000">setExtensionMethod</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$callback</span><span style="color: #D24; font-weight: bold">);
- [118] => }
- [119] => }
- [120] =>
- [121] =>
- [122] =>
- [123] => </span><span style="color: #998; font-style: italic">/**
- [124] => * Returns property value. Do not call directly.
- [125] => * @param string property name
- [126] => * @return mixed property value
- [127] => * @throws MemberAccessException if the property is not defined.
- [128] => */
- [129] => </span><span style="color: #D24; font-weight: bold">public function &</span><span style="color: #000">__get</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">)
- [130] => {
- [131] => return </span><span style="color: #000">ObjectMixin</span><span style="color: #D24; font-weight: bold">::</span><span style="color: #000">get</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$this</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">);
- [132] => }
- [133] =>
- [134] =>
- [135] =>
- [136] => </span><span style="color: #998; font-style: italic">/**
- [137] => * Sets value of a property. Do not call directly.
- [138] => * @param string property name
- [139] => * @param mixed property value
- [140] => * @return void
- [141] => * @throws MemberAccessException if the property is not defined or is read-only
- [142] => */
- [143] => </span><span style="color: #D24; font-weight: bold">public function </span><span style="color: #000">__set</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$value</span><span style="color: #D24; font-weight: bold">)
- [144] => {
- [145] => return </span><span style="color: #000">ObjectMixin</span><span style="color: #D24; font-weight: bold">::</span><span style="color: #000">set</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$this</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$value</span><span style="color: #D24; font-weight: bold">);
- [146] => }
- [147] =>
- [148] =>
- [149] =>
- [150] => </span><span style="color: #998; font-style: italic">/**
- [151] => * Is property defined?
- [152] => * @param string property name
- [153] => * @return bool
- [154] => */
- [155] => </span><span style="color: #D24; font-weight: bold">public function </span><span style="color: #000">__isset</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">)
- [156] => {
- [157] => return </span><span style="color: #000">ObjectMixin</span><span style="color: #D24; font-weight: bold">::</span><span style="color: #000">has</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$this</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">);
- [158] => }
- [159] =>
- [160] =>
- [161] =>
- [162] => </span><span style="color: #998; font-style: italic">/**
- [163] => * Access to undeclared property.
- [164] => * @param string property name
- [165] => * @return void
- [166] => * @throws MemberAccessException
- [167] => */
- [168] => </span><span style="color: #D24; font-weight: bold">public function </span><span style="color: #000">__unset</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">)
- [169] => {
- [170] => </span><span style="color: #000">ObjectMixin</span><span style="color: #D24; font-weight: bold">::</span><span style="color: #000">remove</span><span style="color: #D24; font-weight: bold">(</span><span style="color: #000">$this</span><span style="color: #D24; font-weight: bold">, </span><span style="color: #000">$name</span><span style="color: #D24; font-weight: bold">);
- [171] => }
- [172] =>
- [173] => }
- [174] => </span>
- )
Advertisement
Add Comment
Please, Sign In to add comment