]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/helper/class_BaseHelper.php
Use PHP_EOL instead of chr(10)
[core.git] / inc / classes / main / helper / class_BaseHelper.php
index e8d757028ff96662ef753c88160293d02171c716..0b7e06ad5ce3f3f24ba5f7e248d6a30adb5192cc 100644 (file)
@@ -87,7 +87,7 @@ class BaseHelper extends BaseFrameworkSystem {
         * @return      void
         */
        protected final function addContent ($newContent) {
         * @return      void
         */
        protected final function addContent ($newContent) {
-               $this->content .= (string) trim($newContent) . chr(10);
+               $this->content .= (string) trim($newContent) . PHP_EOL;
        }
 
        /**
        }
 
        /**
@@ -175,7 +175,7 @@ class BaseHelper extends BaseFrameworkSystem {
        public function assignFieldWithFilter ($fieldName, $filterMethod) {
                // Get the value
                $fieldValue = $this->getValueField($fieldName);
        public function assignFieldWithFilter ($fieldName, $filterMethod) {
                // Get the value
                $fieldValue = $this->getValueField($fieldName);
-               //* DEBUG: */ $this->debugOutput($fieldName.'='.$fieldValue);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($fieldName.'='.$fieldValue);
 
                // Now filter it through the value through the filter method
                $filteredValue = call_user_func_array(array($this, 'doFilter' . $this->convertToClassName($filterMethod)), array($fieldValue));
 
                // Now filter it through the value through the filter method
                $filteredValue = call_user_func_array(array($this, 'doFilter' . $this->convertToClassName($filterMethod)), array($fieldValue));
@@ -193,14 +193,14 @@ class BaseHelper extends BaseFrameworkSystem {
         * @throws      NullPointerException    If recovery of requested value instance failed
         */
        public function prefetchValueInstance ($registryKey, $extraKey = NULL) {
         * @throws      NullPointerException    If recovery of requested value instance failed
         */
        public function prefetchValueInstance ($registryKey, $extraKey = NULL) {
-               //* DEBUG: */ $this->debugOutput('O:'.$registryKey.'/'.$extraKey);
+               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('O:'.$registryKey.'/'.$extraKey);
                try {
                        // Get the required instance
                        $this->valueInstance = Registry::getRegistry()->getInstance($registryKey);
                } catch (NullPointerException $e) {
                        // Not set in registry
                        // @TODO Try to log it here
                try {
                        // Get the required instance
                        $this->valueInstance = Registry::getRegistry()->getInstance($registryKey);
                } catch (NullPointerException $e) {
                        // Not set in registry
                        // @TODO Try to log it here
-                       //* DEBUG: */ $this->debugOutput($registryKey.'=NULL!');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($registryKey.'=NULL!');
                }
 
                // Shall we get an extra instance?
                }
 
                // Shall we get an extra instance?
@@ -212,7 +212,7 @@ class BaseHelper extends BaseFrameworkSystem {
                                // Try to create it
                                $this->extraInstance = ObjectFactory::createObjectByConfiguredName($extraKey . '_class', array($this->valueInstance));
                        }
                                // Try to create it
                                $this->extraInstance = ObjectFactory::createObjectByConfiguredName($extraKey . '_class', array($this->valueInstance));
                        }
-                       //* DEBUG: */ $this->debugOutput($extraKey.'='.$this->extraInstance.' - EXTRA!');
+                       //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($extraKey.'='.$this->extraInstance.' - EXTRA!');
                } // END - if
 
                // Is the value instance valid?
                } // END - if
 
                // Is the value instance valid?
@@ -391,7 +391,7 @@ class BaseHelper extends BaseFrameworkSystem {
                // Is header content there?
                if (isset($this->groups['header'])) {
                        // Then add it
                // Is header content there?
                if (isset($this->groups['header'])) {
                        // Then add it
-                       $content .= $this->groups['header']['content'] . chr(10);
+                       $content .= $this->groups['header']['content'] . PHP_EOL;
                } // END - if
 
                // Initiate content
                } // END - if
 
                // Initiate content
@@ -419,7 +419,7 @@ class BaseHelper extends BaseFrameworkSystem {
                // Is footer content there?
                if (isset($this->groups['footer'])) {
                        // Then add it
                // Is footer content there?
                if (isset($this->groups['footer'])) {
                        // Then add it
-                       $content .= $this->groups['footer']['content'] . chr(10);
+                       $content .= $this->groups['footer']['content'] . PHP_EOL;
                } // END - if
 
                // Return it
                } // END - if
 
                // Return it
@@ -457,7 +457,7 @@ class BaseHelper extends BaseFrameworkSystem {
 
                // Get the field value
                $fieldValue = $this->getValueInstance()->getField($fieldName);
 
                // Get the field value
                $fieldValue = $this->getValueInstance()->getField($fieldName);
-               //* DEBUG: */ $this->debugOutput($fieldName.'[]='.gettype($fieldValue).'('.strlen($fieldValue).')');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($fieldName.'[]='.gettype($fieldValue).'('.strlen($fieldValue).')');
 
                // Is it null?
                if ((is_null($fieldValue)) && (!is_null($this->extraInstance))) {
 
                // Is it null?
                if ((is_null($fieldValue)) && (!is_null($this->extraInstance))) {