Code merge from ship-simu
authorRoland Häder <roland@mxchange.org>
Tue, 26 Aug 2008 00:12:53 +0000 (00:12 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 26 Aug 2008 00:12:53 +0000 (00:12 +0000)
inc/classes/main/actions/class_
inc/classes/main/filter/class_
inc/classes/main/helper/captcha/class_
inc/classes/main/helper/class_
inc/classes/main/helper/web/class_
inc/classes/main/helper/web/links/class_WebLinkHelper.php
inc/classes/main/mailer/class_
inc/classes/main/points/class_UserPoints.php
inc/classes/main/response/class_ImageResponse.php
inc/classes/main/user/member/class_Member.php

index a34ccda2683cb856efe69cc1758a1251c78cce17..90ff323406172d5a1bc43376612b7721af007153 100644 (file)
@@ -51,6 +51,7 @@ class ???Action extends BaseAction implements Commandable {
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
+        * @todo        0% done
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                $this->partialStub("You have to implement me.");
index 9027c5d1858caef511146b44342092b26c8d8e69..4aff5132a1362edf52e2e151f0fd68a69f8bbd4b 100644 (file)
@@ -55,6 +55,7 @@ class ???Filter extends BaseFrameworkSystem implements Filterable {
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
+        * @todo        0% done
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Implement this!
index 758b205654be953a29596e013bd46751e9a04c29..5dca7ba2f953b490da07a16c1f720041b7d82fc1 100644 (file)
@@ -57,6 +57,7 @@ class ???Captcha extends BaseCaptcha implements SolveableCaptcha {
         * Initiates the CAPTCHA
         *
         * @return      void
+        * @todo        0% done
         */
        public function initiateCaptcha () {
                $this->partialStub("Please implement this method.");
@@ -66,6 +67,7 @@ class ???Captcha extends BaseCaptcha implements SolveableCaptcha {
         * Render the CAPTCHA code
         *
         * @return      void
+        * @todo        0% done
         */
        public function renderCode () {
                $this->partialStub("Please implement this method.");
index ba6cb0ee12d297f9b82096d9bb680c7a6c402e59..94f912f8cc0e70b8ac7de8bdcb57769037720920 100644 (file)
@@ -52,6 +52,7 @@ class ???Helper extends BaseHelper {
         * Flush the content out,e g. to a template variable
         *
         * @return      void
+        * @todo        0% done
         */
        public function flushContent () {
                $this->partialStub("Please implement this method.");
index 7c61ec83221a4dd2724056347c912287dd042da7..635066acfcfeea2fb1dc9d2f404346378d54025e 100644 (file)
@@ -65,6 +65,7 @@ class Web???Helper extends BaseWebHelper implements HelpableTemplate {
         * Flush the content out,e g. to a template variable
         *
         * @return      void
+        * @todo        0% done
         */
        public function flushContent () {
                $this->partialStub("Please implement this method.");
index 24fb844b23ff6e0093b1fd0f853351d3513082be..40d9c6666b0995bbb0210c120fab7070c75ae3bb 100644 (file)
@@ -67,6 +67,27 @@ class WebLinkHelper extends BaseWebHelper implements HelpableTemplate {
                return $helperInstance;
        }
 
+       /**
+        * Renders the link content (HTML code) with given link text and optional
+        * extra content
+        *
+        * @param       $linkText               Link text to set in link
+        * @param       $extraContent   Optional extra HTML content
+        * @return      $linkContent    Rendered text link content
+        */
+       private function renderLinkContentWithTextExtraContent ($linkText, $extraContent="") {
+               // Construct link content
+               $linkContent = sprintf("<a href=\"%s%s\" title=\"%s\">%s</a>",
+                       $this->getLinkBase(),
+                       $extraContent,
+                       $linkText,
+                       $linkText
+               );
+
+               // Return it
+               return $linkContent;
+       }
+
        /**
         * Setter for link name
         *
@@ -191,31 +212,46 @@ class WebLinkHelper extends BaseWebHelper implements HelpableTemplate {
                // Check if a previous group was opened
                if (!$this->ifGroupOpenedPreviously()) {
                        // No group was opened before!
-                       throw new NoGroupOpenedException(array($this, $groupNote), self::EXCEPTION_GROUP_NOT_OPENED);
+                       throw new NoGroupOpenedException(array($this, $linkAction."(".$linkText.")"), self::EXCEPTION_GROUP_NOT_OPENED);
                } // END - if
 
                // Default parameter seperator is &amp;
                $seperator = "&amp;";
 
-               // Get link base
-               $linkBase = $this->getLinkBase();
-
                // Is there a question mark in?
-               $linkArray = explode("?", $linkBase);
+               $linkArray = explode("?", $this->getLinkBase());
                if (count($linkArray) == 0) {
                        // No question mark
                        $seperator = "?";
-               }
+               } // END - if
 
-               // Renders the link content
-               $linkContent = sprintf("<a href=\"%s%saction=%s\" title=\"%s\">%s</a>",
-                       $linkBase,
+               // Prepare action
+               $action = sprintf("%saction=%s",
                        $seperator,
-                       $linkAction,
-                       $linkText,
-                       $linkText
+                       $linkAction
                );
 
+               // Renders the link content
+               $linkContent = $this->renderLinkContentWithTextExtraContent($linkText, $action);
+
+               // Add the content to the previous group
+               $this->addContentToPreviousGroup($linkContent);
+       }
+
+       /**
+        * Adds a default link (no extra parameters) to the content with specified
+        * language id string.
+        *
+        * @param       $languageId             Language id string to use
+        * @return      void
+        */
+       public function addLinkWithTextById ($languageId) {
+               // Resolve the language string
+               $languageResolved = $this->getLanguageInstance()->getMessage($languageId);
+
+               // Now add the link
+               $linkContent = $this->renderLinkContentWithTextExtraContent($languageResolved);
+
                // Add the content to the previous group
                $this->addContentToPreviousGroup($linkContent);
        }
index b3181c54a00df763c9c0a91356bd6bc7b0b2208a..5cf368f875b9e98413cba0964cdb7e6557a35b1c 100644 (file)
@@ -49,6 +49,7 @@ class ???Mailer extends BaseMailer implements DeliverableMail {
         * Deliver email to the recipient(s)
         *
         * @return      void
+        * @todo        0% done
         */
        public function deliverEmail() {
                $this->partialStub("You have to implement this method.");
@@ -58,6 +59,7 @@ class ???Mailer extends BaseMailer implements DeliverableMail {
         * Send notification to the admin
         *
         * @return      void
+        * @todo        0% done
         */
        public function sendAdminNotification() {
                $this->partialStub("You have to implement this method.");
index 6a9d88f172e03ff9b98df8b7c989b9833cc22264..17c22e2548842fb4eccf3ee72bafe3b68f04cc87 100644 (file)
@@ -58,6 +58,7 @@ class UserPoints extends BaseFrameworkSystem implements Registerable {
         *
         * @param       $action                 The action or configuration entry plus prefix the user wants to perform
         * @return      $hasRequired    Wether the user has the required points
+        * @todo        Finish loading part of points
         */
        public function ifUserHasRequiredPoints ($action) {
                // Default is that everyone is poor... ;-)
index 2329af7f3931eb038edc2eee04ddc4fcaa709b41..71acb351dd53803c24d3d6006caaa71f12281abc 100644 (file)
@@ -145,6 +145,7 @@ class ImageResponse extends BaseFrameworkSystem implements Responseable {
         * @param       $force  Wether we shall force the output or abort if headers are
         *                                      already sent with an exception
         * @return      void
+        * @todo        Add support for fatal messages in image response
         * @throws      ResponseHeadersAlreadySentException             Thrown if headers are
         *                                                                                                      already sent
         */
index cdb98c1b9220add8880531b429f3375176ab8b01..141f1de389c874dbe39fb034a83b4ca55ed1d351 100644 (file)
@@ -94,6 +94,7 @@ class Member extends BaseUser implements ManageableMember, Registerable, Updatea
         *
         * @param       $requestInstance        An instance of a Requestable class
         * @return      $userInstance           An instance of this user class
+        * @todo        Add more ways over creating user classes
         */
        public final static function createMemberByRequest (Requestable $requestInstance) {
                // Determine if by email or username