Skip to content
Browse files

All classes and interfaces are in its own file now

  • Loading branch information...
1 parent b17cf01 commit 4ae7a41a475e106a755496de3e84a1a385489f7a @dg dg committed Nov 23, 2010
View
40 Nette/Application/IPartiallyRenderable.php
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * This file is part of the Nette Framework.
+ *
+ * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
+ *
+ * This source file is subject to the "Nette license", and/or
+ * GPL license. For more information please see http://nette.org
+ */
+
+namespace Nette\Application;
+
+use Nette;
+
+
+
+/**
+ *
+ *
+ * @author David Grudl
+ */
+interface IPartiallyRenderable extends IRenderable
+{
+
+ /**
+ * Forces control or its snippet to repaint.
+ * @param string
+ * @return void
+ */
+ //function invalidateControl($snippet = NULL);
+
+ /**
+ * Is required to repaint the control or its snippet?
+ * @param string snippet name
+ * @return bool
+ */
+ //function isControlInvalid($snippet = NULL);
+
+}
View
26 Nette/Application/IRenderable.php
@@ -37,29 +37,3 @@ function invalidateControl();
function isControlInvalid();
}
-
-
-
-/**
- *
- *
- * @author David Grudl
- */
-interface IPartiallyRenderable extends IRenderable
-{
-
- /**
- * Forces control or its snippet to repaint.
- * @param string
- * @return void
- */
- //function invalidateControl($snippet = NULL);
-
- /**
- * Is required to repaint the control or its snippet?
- * @param string snippet name
- * @return bool
- */
- //function isControlInvalid($snippet = NULL);
-
-}
View
43 Nette/ComponentModel/ComponentContainer.php
@@ -249,46 +249,3 @@ public function _isCloning()
}
}
-
-
-
-/**
- * Recursive component iterator. See ComponentContainer::getComponents().
- *
- * @author David Grudl
- */
-class RecursiveComponentIterator extends \RecursiveArrayIterator implements \Countable
-{
-
- /**
- * Has the current element has children?
- * @return bool
- */
- public function hasChildren()
- {
- return $this->current() instanceof IComponentContainer;
- }
-
-
-
- /**
- * The sub-iterator for the current element.
- * @return \RecursiveIterator
- */
- public function getChildren()
- {
- return $this->current()->getComponents();
- }
-
-
-
- /**
- * Returns the count of elements.
- * @return int
- */
- public function count()
- {
- return iterator_count($this);
- }
-
-}
View
58 Nette/ComponentModel/RecursiveComponentIterator.php
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * This file is part of the Nette Framework.
+ *
+ * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
+ *
+ * This source file is subject to the "Nette license", and/or
+ * GPL license. For more information please see http://nette.org
+ */
+
+namespace Nette;
+
+use Nette;
+
+
+
+/**
+ * Recursive component iterator. See ComponentContainer::getComponents().
+ *
+ * @author David Grudl
+ * @internal
+ */
+class RecursiveComponentIterator extends \RecursiveArrayIterator implements \Countable
+{
+
+ /**
+ * Has the current element has children?
+ * @return bool
+ */
+ public function hasChildren()
+ {
+ return $this->current() instanceof IComponentContainer;
+ }
+
+
+
+ /**
+ * The sub-iterator for the current element.
+ * @return \RecursiveIterator
+ */
+ public function getChildren()
+ {
+ return $this->current()->getComponents();
+ }
+
+
+
+ /**
+ * Returns the count of elements.
+ * @return int
+ */
+ public function count()
+ {
+ return iterator_count($this);
+ }
+
+}
View
20 Nette/Loaders/NetteLoader.php
@@ -36,7 +36,7 @@ class NetteLoader extends AutoLoader
'invalidstateexception' => '/Utils/exceptions.php',
'ioexception' => '/Utils/exceptions.php',
'memberaccessexception' => '/Utils/exceptions.php',
- 'nette\ambiguousserviceexception' => '/Utils/Context.php',
+ 'nette\ambiguousserviceexception' => '/Utils/AmbiguousServiceException.php',
'nette\application\abortexception' => '/Application/Exceptions/AbortException.php',
'nette\application\appform' => '/Application/AppForm.php',
'nette\application\application' => '/Application/Application.php',
@@ -50,7 +50,7 @@ class NetteLoader extends AutoLoader
'nette\application\forwardingresponse' => '/Application/Responses/ForwardingResponse.php',
'nette\application\invalidlinkexception' => '/Application/Exceptions/InvalidLinkException.php',
'nette\application\invalidpresenterexception' => '/Application/Exceptions/InvalidPresenterException.php',
- 'nette\application\ipartiallyrenderable' => '/Application/IRenderable.php',
+ 'nette\application\ipartiallyrenderable' => '/Application/IPartiallyRenderable.php',
'nette\application\ipresenter' => '/Application/IPresenter.php',
'nette\application\ipresenterloader' => '/Application/IPresenterLoader.php',
'nette\application\ipresenterresponse' => '/Application/IPresenterResponse.php',
@@ -131,7 +131,7 @@ class NetteLoader extends AutoLoader
'nette\instancefilteriterator' => '/Utils/Iterators/InstanceFilterIterator.php',
'nette\itranslator' => '/Utils/ITranslator.php',
'nette\json' => '/Utils/Json.php',
- 'nette\jsonexception' => '/Utils/Json.php',
+ 'nette\jsonexception' => '/Utils/JsonException.php',
'nette\loaders\autoloader' => '/Loaders/AutoLoader.php',
'nette\loaders\limitedscope' => '/Loaders/LimitedScope.php',
'nette\loaders\netteloader' => '/Loaders/NetteLoader.php',
@@ -140,15 +140,15 @@ class NetteLoader extends AutoLoader
'nette\mail\mail' => '/Mail/Mail.php',
'nette\mail\mailmimepart' => '/Mail/MailMimePart.php',
'nette\mail\sendmailmailer' => '/Mail/SendmailMailer.php',
- 'nette\mail\smtpexception' => '/Mail/SmtpMailer.php',
+ 'nette\mail\smtpexception' => '/Mail/SmtpException.php',
'nette\mail\smtpmailer' => '/Mail/SmtpMailer.php',
- 'nette\neonexception' => '/Utils/NeonParser.php',
+ 'nette\neonexception' => '/Utils/NeonException.php',
'nette\neonparser' => '/Utils/NeonParser.php',
'nette\object' => '/Utils/Object.php',
'nette\objectmixin' => '/Utils/ObjectMixin.php',
'nette\paginator' => '/Utils/Paginator.php',
- 'nette\recursivecallbackfilteriterator' => '/Utils/Iterators/CallbackFilterIterator.php',
- 'nette\recursivecomponentiterator' => '/ComponentModel/ComponentContainer.php',
+ 'nette\recursivecallbackfilteriterator' => '/Utils/Iterators/RecursiveCallbackFilterIterator.php',
+ 'nette\recursivecomponentiterator' => '/ComponentModel/RecursiveComponentIterator.php',
'nette\reflection\annotation' => '/Reflection/Annotation.php',
'nette\reflection\annotationsparser' => '/Reflection/AnnotationsParser.php',
'nette\reflection\classreflection' => '/Reflection/ClassReflection.php',
@@ -158,7 +158,7 @@ class NetteLoader extends AutoLoader
'nette\reflection\methodreflection' => '/Reflection/MethodReflection.php',
'nette\reflection\parameterreflection' => '/Reflection/ParameterReflection.php',
'nette\reflection\propertyreflection' => '/Reflection/PropertyReflection.php',
- 'nette\regexpexception' => '/Utils/String.php',
+ 'nette\regexpexception' => '/Utils/RegexpException.php',
'nette\safestream' => '/Utils/SafeStream.php',
'nette\security\authenticationexception' => '/Security/AuthenticationException.php',
'nette\security\iauthenticator' => '/Security/IAuthenticator.php',
@@ -175,7 +175,7 @@ class NetteLoader extends AutoLoader
'nette\templates\filetemplate' => '/Templates/FileTemplate.php',
'nette\templates\ifiletemplate' => '/Templates/IFileTemplate.php',
'nette\templates\itemplate' => '/Templates/ITemplate.php',
- 'nette\templates\latteexception' => '/Templates/Filters/LatteFilter.php',
+ 'nette\templates\latteexception' => '/Templates/Filters/LatteException.php',
'nette\templates\lattefilter' => '/Templates/Filters/LatteFilter.php',
'nette\templates\lattemacros' => '/Templates/Filters/LatteMacros.php',
'nette\templates\template' => '/Templates/Template.php',
@@ -184,7 +184,7 @@ class NetteLoader extends AutoLoader
'nette\templates\templatefilters' => '/Templates/Filters/TemplateFilters.php',
'nette\templates\templatehelpers' => '/Templates/Filters/TemplateHelpers.php',
'nette\tokenizer' => '/Utils/Tokenizer.php',
- 'nette\tokenizerexception' => '/Utils/Tokenizer.php',
+ 'nette\tokenizerexception' => '/Utils/TokenizerException.php',
'nette\tools' => '/Utils/Tools.php',
'nette\web\html' => '/Web/Html.php',
'nette\web\httpcontext' => '/Web/HttpContext.php',
View
25 Nette/Mail/SmtpException.php
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * This file is part of the Nette Framework.
+ *
+ * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
+ *
+ * This source file is subject to the "Nette license", and/or
+ * GPL license. For more information please see http://nette.org
+ */
+
+namespace Nette\Mail;
+
+use Nette;
+
+
+
+/**
+ * SMTP mailer exception.
+ *
+ * @author David Grudl
+ */
+class SmtpException extends \Exception
+{
+}
View
11 Nette/Mail/SmtpMailer.php
@@ -183,14 +183,3 @@ private function read()
}
}
-
-
-
-/**
- * SMTP mailer exception.
- *
- * @author David Grudl
- */
-class SmtpException extends \Exception
-{
-}
View
25 Nette/Templates/Filters/LatteException.php
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * This file is part of the Nette Framework.
+ *
+ * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
+ *
+ * This source file is subject to the "Nette license", and/or
+ * GPL license. For more information please see http://nette.org
+ */
+
+namespace Nette\Templates;
+
+use Nette;
+
+
+
+/**
+ * The exception occured during Latte compilation.
+ *
+ * @author David Grudl
+ */
+class LatteException extends TemplateException
+{
+}
View
11 Nette/Templates/Filters/LatteFilter.php
@@ -454,14 +454,3 @@ static function formatString($s)
/**#@-*/
}
-
-
-
-/**
- * The exception occured during Latte compilation.
- *
- * @author David Grudl
- */
-class LatteException extends TemplateException
-{
-}
View
25 Nette/Utils/AmbiguousServiceException.php
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * This file is part of the Nette Framework.
+ *
+ * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
+ *
+ * This source file is subject to the "Nette license", and/or
+ * GPL license. For more information please see http://nette.org
+ */
+
+namespace Nette;
+
+use Nette;
+
+
+
+/**
+ * Ambiguous service resolution exception.
+ *
+ * @author David Grudl
+ */
+class AmbiguousServiceException extends \Exception
+{
+}
View
11 Nette/Utils/Context.php
@@ -172,14 +172,3 @@ public function hasService($name, $created = FALSE)
}
}
-
-
-
-/**
- * Ambiguous service resolution exception.
- *
- * @author David Grudl
- */
-class AmbiguousServiceException extends \Exception
-{
-}
View
52 Nette/Utils/Iterators/CallbackFilterIterator.php
@@ -45,55 +45,3 @@ function accept()
}
}
-
-
-
-/**
- * Callback recursive iterator filter.
- *
- * @author David Grudl
- */
-class RecursiveCallbackFilterIterator extends \FilterIterator implements \RecursiveIterator
-{
- /** @var callback */
- private $callback;
-
- /** @var callback */
- private $childrenCallback;
-
-
- /**
- * Constructs a filter around another iterator.
- * @param
- * @param callback
- */
- function __construct(\RecursiveIterator $iterator, $callback, $childrenCallback = NULL)
- {
- parent::__construct($iterator);
- $this->callback = $callback;
- $this->childrenCallback = $childrenCallback;
- }
-
-
-
- function accept()
- {
- return $this->callback === NULL || call_user_func($this->callback, $this);
- }
-
-
-
- function hasChildren()
- {
- return $this->getInnerIterator()->hasChildren()
- && ($this->childrenCallback === NULL || call_user_func($this->childrenCallback, $this));
- }
-
-
-
- function getChildren()
- {
- return new self($this->getInnerIterator()->getChildren(), $this->callback, $this->childrenCallback);
- }
-
-}
View
66 Nette/Utils/Iterators/RecursiveCallbackFilterIterator.php
@@ -0,0 +1,66 @@
+<?php
+
+/**
+ * This file is part of the Nette Framework.
+ *
+ * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
+ *
+ * This source file is subject to the "Nette license", and/or
+ * GPL license. For more information please see http://nette.org
+ */
+
+namespace Nette;
+
+use Nette;
+
+
+
+/**
+ * Callback recursive iterator filter.
+ *
+ * @author David Grudl
+ */
+class RecursiveCallbackFilterIterator extends \FilterIterator implements \RecursiveIterator
+{
+ /** @var callback */
+ private $callback;
+
+ /** @var callback */
+ private $childrenCallback;
+
+
+ /**
+ * Constructs a filter around another iterator.
+ * @param
+ * @param callback
+ */
+ function __construct(\RecursiveIterator $iterator, $callback, $childrenCallback = NULL)
+ {
+ parent::__construct($iterator);
+ $this->callback = $callback;
+ $this->childrenCallback = $childrenCallback;
+ }
+
+
+
+ function accept()
+ {
+ return $this->callback === NULL || call_user_func($this->callback, $this);
+ }
+
+
+
+ function hasChildren()
+ {
+ return $this->getInnerIterator()->hasChildren()
+ && ($this->childrenCallback === NULL || call_user_func($this->childrenCallback, $this));
+ }
+
+
+
+ function getChildren()
+ {
+ return new self($this->getInnerIterator()->getChildren(), $this->callback, $this->childrenCallback);
+ }
+
+}
View
9 Nette/Utils/Json.php
@@ -85,12 +85,3 @@ public static function decode($json, $options = 0)
}
}
-
-
-
-/**
- * The exception that indicates error of JSON encoding/decoding.
- */
-class JsonException extends \Exception
-{
-}
View
23 Nette/Utils/JsonException.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * This file is part of the Nette Framework.
+ *
+ * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
+ *
+ * This source file is subject to the "Nette license", and/or
+ * GPL license. For more information please see http://nette.org
+ */
+
+namespace Nette;
+
+use Nette;
+
+
+
+/**
+ * The exception that indicates error of JSON encoding/decoding.
+ */
+class JsonException extends \Exception
+{
+}
View
23 Nette/Utils/NeonException.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * This file is part of the Nette Framework.
+ *
+ * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
+ *
+ * This source file is subject to the "Nette license", and/or
+ * GPL license. For more information please see http://nette.org
+ */
+
+namespace Nette;
+
+use Nette;
+
+
+
+/**
+ * The exception that indicates error of NEON decoding.
+ */
+class NeonException extends \Exception
+{
+}
View
9 Nette/Utils/NeonParser.php
@@ -222,12 +222,3 @@ private function error($message = "Unexpected '%s'")
}
}
-
-
-
-/**
- * The exception that indicates error of NEON decoding.
- */
-class NeonException extends \Exception
-{
-}
View
23 Nette/Utils/RegexpException.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * This file is part of the Nette Framework.
+ *
+ * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
+ *
+ * This source file is subject to the "Nette license", and/or
+ * GPL license. For more information please see http://nette.org
+ */
+
+namespace Nette;
+
+use Nette;
+
+
+
+/**
+ * The exception that indicates error of the last Regexp execution.
+ */
+class RegexpException extends \Exception
+{
+}
View
9 Nette/Utils/String.php
@@ -435,12 +435,3 @@ public static function catchPregError($pattern)
}
}
-
-
-
-/**
- * The exception that indicates error of the last Regexp execution.
- */
-class RegexpException extends \Exception
-{
-}
View
9 Nette/Utils/Tokenizer.php
@@ -112,12 +112,3 @@ public function getOffset($i)
}
}
-
-
-
-/**
- * The exception that indicates tokenizer error.
- */
-class TokenizerException extends \Exception
-{
-}
View
23 Nette/Utils/TokenizerException.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * This file is part of the Nette Framework.
+ *
+ * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
+ *
+ * This source file is subject to the "Nette license", and/or
+ * GPL license. For more information please see http://nette.org
+ */
+
+namespace Nette;
+
+use Nette;
+
+
+
+/**
+ * The exception that indicates tokenizer error.
+ */
+class TokenizerException extends \Exception
+{
+}
View
3 Nette/loader.php
@@ -45,10 +45,7 @@
require_once __DIR__ . '/Utils/shortcuts.php';
require_once __DIR__ . '/Utils/exceptions.php';
-require_once __DIR__ . '/Utils/Framework.php';
require_once __DIR__ . '/Utils/Object.php';
-require_once __DIR__ . '/Utils/ObjectMixin.php';
-require_once __DIR__ . '/Utils/Callback.php';
require_once __DIR__ . '/Loaders/LimitedScope.php';
require_once __DIR__ . '/Loaders/AutoLoader.php';
require_once __DIR__ . '/Loaders/NetteLoader.php';

0 comments on commit 4ae7a41

Please sign in to comment.
Something went wrong with that request. Please try again.