Permalink
Browse files

updated props & phpDoc

  • Loading branch information...
0 parents commit c13ed82c2f170f89cd380b399fe4528d50f064d7 @dg dg committed Jan 23, 2006
Showing with 12,953 additions and 0 deletions.
  1. +177 −0 Nette/Collections/ArrayList.php
  2. +266 −0 Nette/Collections/Collection.php
  3. +227 −0 Nette/Collections/Hashtable.php
  4. +42 −0 Nette/Collections/ICollection.php
  5. +41 −0 Nette/Collections/IList.php
  6. +42 −0 Nette/Collections/IMap.php
  7. +34 −0 Nette/Collections/ISet.php
  8. +101 −0 Nette/Collections/Set.php
  9. +334 −0 Nette/Component.php
  10. +221 −0 Nette/ComponentContainer.php
  11. +203 −0 Nette/Config.php
  12. +269 −0 Nette/ConfigAdapters.php
  13. +443 −0 Nette/Debug.php
  14. +410 −0 Nette/Environment.php
  15. +41 −0 Nette/ICausedException.php
  16. +67 −0 Nette/IComponent.php
  17. +63 −0 Nette/IComponentContainer.php
  18. +41 −0 Nette/IDebuggable.php
  19. +314 −0 Nette/IO/SafeStream.php
  20. +55 −0 Nette/IServiceLocator.php
  21. +118 −0 Nette/Loaders/AutoLoader.php
  22. +138 −0 Nette/Loaders/NetteLoader.php
  23. +275 −0 Nette/Loaders/RobotLoader.php
  24. +60 −0 Nette/Loaders/SimpleLoader.php
  25. +280 −0 Nette/Object.php
  26. +42 −0 Nette/Security/AuthenticationException.php
  27. +45 −0 Nette/Security/IAuthenticator.php
  28. +45 −0 Nette/Security/IAuthorizator.php
  29. +47 −0 Nette/Security/IIdentity.php
  30. +97 −0 Nette/Security/Identity.php
  31. +1,014 −0 Nette/Security/Permission.php
  32. +82 −0 Nette/Security/SimpleAuthenticator.php
  33. +201 −0 Nette/ServiceLocator.php
  34. +58 −0 Nette/String.php
  35. +198 −0 Nette/Tools.php
  36. +30 −0 Nette/Version.php
  37. +508 −0 Nette/Web/Html.php
  38. +677 −0 Nette/Web/HttpRequest.php
  39. +244 −0 Nette/Web/HttpResponse.php
  40. +141 −0 Nette/Web/IHttpRequest.php
  41. +72 −0 Nette/Web/IHttpResponse.php
  42. +507 −0 Nette/Web/Session.php
  43. +215 −0 Nette/Web/SessionNamespace.php
  44. +318 −0 Nette/Web/User.php
  45. +118 −0 Nette/exceptions.php
  46. +24 −0 Nette/loader.php
  47. +36 −0 Nette/templates/Debug.closepanel.phtml
  48. +38 −0 Nette/templates/Debug.openpanel.phtml
  49. +398 −0 Nette/templates/Debug.phtml
  50. +69 −0 license.cs.txt
  51. +61 −0 license.txt
  52. +19 −0 readme.txt
  53. +3 −0 tests/Collections/_test.bat
  54. +121 −0 tests/Collections/ref/test.ArrayList.php.html
  55. +58 −0 tests/Collections/ref/test.Collection.php.html
  56. +130 −0 tests/Collections/ref/test.Hashtable.php.html
  57. +86 −0 tests/Collections/ref/test.Set.php.html
  58. +247 −0 tests/Collections/test.ArrayList.php
  59. +183 −0 tests/Collections/test.Collection.php
  60. +308 −0 tests/Collections/test.Hashtable.php
  61. +192 −0 tests/Collections/test.Set.php
  62. +3 −0 tests/Debug/_test.bat
  63. +51 −0 tests/Debug/ref/test.dump.php.html
  64. +3 −0 tests/Debug/ref/test.error.php.html
  65. +431 −0 tests/Debug/ref/test.exception.html.php.html
  66. +8 −0 tests/Debug/ref/test.exception.php.html
  67. +393 −0 tests/Debug/ref/test.filter.php.html
  68. +4 −0 tests/Debug/ref/test.notice.php.html
  69. +4 −0 tests/Debug/ref/test.timer.php.html
  70. +4 −0 tests/Debug/ref/test.warning.php.html
  71. +44 −0 tests/Debug/test.dump.php
  72. +30 −0 tests/Debug/test.error.php
  73. +33 −0 tests/Debug/test.exception.html.php
  74. +30 −0 tests/Debug/test.exception.php
  75. +24 −0 tests/Debug/test.filter.php
  76. +32 −0 tests/Debug/test.notice.php
  77. +13 −0 tests/Debug/test.timer.php
  78. +32 −0 tests/Debug/test.warning.php
  79. +20 −0 tests/IO.SafeStream/demo.php
  80. +90 −0 tests/IO.SafeStream/stress.php
  81. +3 −0 tests/Loaders/_test.bat
  82. +5 −0 tests/Loaders/ref/test.NetteLoader.php.html
  83. +5 −0 tests/Loaders/ref/test.RobotLoader.php.html
  84. +5 −0 tests/Loaders/ref/test.SimpleLoader.php.html
  85. +12 −0 tests/Loaders/test.NetteLoader.php
  86. +17 −0 tests/Loaders/test.RobotLoader.php
  87. +16 −0 tests/Loaders/test.SimpleLoader.php
  88. +3 −0 tests/Object/_test.bat
  89. +14 −0 tests/Object/_testall.bat
  90. +14 −0 tests/Object/ref/test.events.php.html
  91. +8 −0 tests/Object/ref/test.extends.php.html
  92. +40 −0 tests/Object/ref/test.property.php.html
  93. +50 −0 tests/Object/ref/test.reflection.php.html
  94. +96 −0 tests/Object/test.events.php
  95. +52 −0 tests/Object/test.extends.php
  96. +139 −0 tests/Object/test.property.php
  97. +32 −0 tests/Object/test.reflection.php
  98. +3 −0 tests/Web.Html/_test.bat
  99. +22 −0 tests/Web.Html/ref/test.html.php.html
  100. +22 −0 tests/Web.Html/ref/test.xhtml.php.html
  101. +8 −0 tests/Web.Html/test.html.php
  102. +94 −0 tests/Web.Html/test.xhtml.php
  103. +5 −0 tests/Web.HttpRequest/_test.bat
  104. +49 −0 tests/Web.HttpRequest/ref/test.httpRequest.php.html
  105. +53 −0 tests/Web.HttpRequest/ref/test.httpRequest.php.wget.html
  106. +39 −0 tests/Web.HttpRequest/test.httpRequest.php
  107. +4 −0 version.txt
@@ -0,0 +1,177 @@
+<?php
+
+/**
+ * Nette Framework
+ *
+ * Copyright (c) 2004, 2008 David Grudl (http://davidgrudl.com)
+ *
+ * This source file is subject to the "Nette license" that is bundled
+ * with this package in the file license.txt.
+ *
+ * For more information please see http://nettephp.com/
+ *
+ * @copyright Copyright (c) 2004, 2008 David Grudl
+ * @license http://nettephp.com/license Nette license
+ * @link http://nettephp.com/
+ * @category Nette
+ * @package Nette::Collections
+ */
+
+/*namespace Nette::Collections;*/
+
+
+
+require_once dirname(__FILE__) . '/../Collections/Collection.php';
+
+require_once dirname(__FILE__) . '/../Collections/IList.php';
+
+
+
+/**
+ * Provides the base class for a generic list (items can be accessed by index).
+ *
+ * @author David Grudl
+ * @copyright Copyright (c) 2004, 2008 David Grudl
+ * @package Nette::Collections
+ * @version $Revision$ $Date$
+ */
+class ArrayList extends Collection implements IList
+{
+ /** @var int */
+ protected $base = 0;
+
+
+ /**
+ * Inserts the specified element at the specified position in this list.
+ * @param int
+ * @param mixed
+ * @return bool
+ * @throws ::ArgumentOutOfRangeException
+ */
+ public function insertAt($index, $item)
+ {
+ $index -= $this->base;
+ if ($index < 0 || $index > count($this->data)) {
+ throw new /*::*/ArgumentOutOfRangeException;
+ }
+
+ $this->beforeAdd($item);
+ array_splice($this->data, (int) $index, 0, array($item));
+ return TRUE;
+ }
+
+
+
+ /**
+ * Removes the first occurrence of the specified element.
+ * @param mixed
+ * @return bool true if this list changed as a result of the call
+ * @throws ::NotSupportedException
+ */
+ public function remove($item)
+ {
+ $this->beforeRemove();
+
+ $index = $this->search($item);
+ if ($index === FALSE) {
+ return FALSE;
+ } else {
+ array_splice($this->data, $index, 1);
+ return TRUE;
+ }
+ }
+
+
+
+ /**
+ * Returns the index of the first occurrence of the specified element,.
+ * or FALSE if this list does not contain this element.
+ * @param mixed
+ * @return int|FALSE
+ */
+ public function indexOf($item)
+ {
+ $index = $this->search($item);
+ return $index === FALSE ? FALSE : $this->base + $index;
+ }
+
+
+
+ /********************* interface ::ArrayAccess ****************d*g**/
+
+
+
+ /**
+ * Replaces (or appends) the item (::ArrayAccess implementation).
+ * @param int index
+ * @param object
+ * @return void
+ * @throws ::InvalidArgumentException, ::NotSupportedException, ::ArgumentOutOfRangeException
+ */
+ public function offsetSet($index, $item)
+ {
+ $this->beforeAdd($item);
+
+ if ($index === NULL) { // append
+ $this->data[] = $item;
+
+ } else { // replace
+ $index -= $this->base;
+ if ($index < 0 || $index >= count($this->data)) {
+ throw new /*::*/ArgumentOutOfRangeException;
+ }
+ $this->data[$index] = $item;
+ }
+ }
+
+
+
+ /**
+ * Returns item (::ArrayAccess implementation).
+ * @param int index
+ * @return mixed
+ * @throws ::ArgumentOutOfRangeException
+ */
+ public function offsetGet($index)
+ {
+ $index -= $this->base;
+ if ($index < 0 || $index >= count($this->data)) {
+ throw new /*::*/ArgumentOutOfRangeException;
+ }
+
+ return $this->data[$index];
+ }
+
+
+
+ /**
+ * Exists item? (::ArrayAccess implementation).
+ * @param int index
+ * @return bool
+ */
+ public function offsetExists($index)
+ {
+ $index -= $this->base;
+ return $index >= 0 && $index < count($this->data);
+ }
+
+
+
+ /**
+ * Removes the element at the specified position in this list.
+ * @param int index
+ * @return void
+ * @throws ::NotSupportedException, ::ArgumentOutOfRangeException
+ */
+ public function offsetUnset($index)
+ {
+ $index -= $this->base;
+ if ($index < 0 || $index >= count($this->data)) {
+ throw new /*::*/ArgumentOutOfRangeException;
+ }
+
+ $this->beforeRemove();
+ array_splice($this->data, (int) $index, 1);
+ }
+
+}
Oops, something went wrong.

0 comments on commit c13ed82

Please sign in to comment.