Error write function

@param string $text
@return boolean
165215
static public function write($text)
    {

        $text = str_replace('<div>', '', $text);
        $text = str_replace('</div>', '; ', $text);

        $data ['text'] = "\n" . date('Y-m-d H:i') . '; ' . $text;

        $data ['parameters'] = serialize($_REQUEST);

        $tFile = fopen(self::$writeFile, 'a');

        fputs($tFile, $data ['text']);

        fclose($tFile);

        return true;
    }
594
public function error(string $text, array $style = []): string
    {
        return $this->line($text, ['fg' => static::RED] + $style);
    }
1373019
public function iWaitForTextToDisappear($text)
   {
       $this->spin(function(FeatureContext $context) use ($text) {
           try {
               $context->assertPageContainsText($text);
           }
           catch(\Behat\Mink\Exception\ResponseTextException $e) {
               return true;
           }
           return false;
       });
   }
1348162
private function MatchText( $text )
	{
		for ( $k = 0; $k < strlen( $text ); $k++ )
		{
			$ch = $this->Peek( $k );
			if ( $ch == 0 || $ch != $text[ $k ] )
				return false;
		}
		for ( $k = 0; $k < strlen( $text ); $k++ )
			$this->Read();
		return true;
	}
1192910
public function iWaitUntilISeeText($text){
        $page = $this->getSession()->getPage();
        $session = $this->getSession();
        $this->spin(function($page) use ($page, $session, $text) {
            $element = $page->find(
                'xpath',
                $session->getSelectorsHandler()->selectorToXpath("xpath", ".//*[contains(text(), '$text')]")
            );

            if(empty($element)) {
                return false;
            } else {
                return ($element->isVisible());
            }
        });
    }
346420
public function err($text = '', $nl = true)
	{
		fwrite(STDERR, $this->processor->process($text) . ($nl ? "\n" : null));

		return $this;
	}
866405
static function strtolower( $text )
    {
        //We need to detect our internal charset
        if ( self::$charset === null )
        {
            self::$charset = eZTextCodec::internalCharset();
        }

        //First try to use mbstring
        if ( extension_loaded( 'mbstring' ) )
        {
            return mb_strtolower( $text, self::$charset );
        }
        else
        {
            // Fall back if mbstring is not available
            $char = eZCharTransform::instance();
            return $char->transformByGroup( $text, 'lowercase' );
        }
    }
1123744
public function error($field, $text = null)
    {
        /** @type Form_Field $form_field */
        $form_field = $this->getElement($field);
        $form_field->displayFieldError($text);
    }
311450
public function write($string)
    {
        if ($this->isWritable()) {
            $size = $this->getSize();
            $count = fwrite($this->stream, $string);
            $this->setSize($size + $count);
            return $count;
        } else {
            return false;
        }
    }
145184
function write($text,$format='r') {
		$fw=Base::instance();
		$fw->write(
			$this->file,
			date($format).
				(isset($_SERVER['REMOTE_ADDR'])?
					(' ['.$_SERVER['REMOTE_ADDR'].']'):'').' '.
			trim($text).PHP_EOL,
			TRUE
		);
	}
845977
private function writeLine($text, $indent = 0)
    {
        $indent = strlen($text) + $indent;
        $format = '%'.$indent.'s';

        $this->reference .= sprintf($format, $text).PHP_EOL;
    }
598731
public function writeRaw($text)
	{
		if (isset($this->_xmlWriter) && is_object($this->_xmlWriter) && (method_exists($this->_xmlWriter, 'writeRaw'))) {
			return $this->_xmlWriter->writeRaw($text);
		}

		return $this->text($text);
	}
45014
public function write($text, $params=array())
    {
        $color = (isset($params['color'])) ?  $params['color'] : array(0, 0, 0);
        $color = imagecolorallocate($this->edited, $color[0], $color[1], $color[2]);
        $size = (isset($params['size']))? $params['size'] : 5;
        $x = (isset($params['x']))? $params['x'] : 2;
        $y = (isset($params['y']))? $params['y'] : 2;


        imagestring($this->edited, $size, $x, $y, $text, $color);
    }
996319
protected function _encode($text)
    {
        $restore = mb_internal_encoding();
        mb_internal_encoding($this->_appCharset);
        if (empty($this->headerCharset)) {
            $this->headerCharset = $this->charset;
        }
        $return = mb_encode_mimeheader($text, $this->headerCharset, 'B');
        mb_internal_encoding($restore);

        return $return;
    }
783927
public static function isWellFormed( $text ) {
		$parser = xml_parser_create( "UTF-8" );

		# case folding violates XML standard, turn it off
		xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, false );

		if( !xml_parse( $parser, $text, true ) ) {
			//$err = xml_error_string( xml_get_error_code( $parser ) );
			//$position = xml_get_current_byte_index( $parser );
			//$fragment = $this->extractFragment( $html, $position );
			//$this->mXmlError = "$err at byte $position:\n$fragment";
			xml_parser_free( $parser );
			return false;
		}

		xml_parser_free( $parser );

		return true;
	}
956317
public function setHtmlBody($text) {
    if (!is_string($text)) {
      $error = sprintf("HTML text given is not a string (Actual type: %s).",
                       gettype($text));
      throw new \InvalidArgumentException($error);
    }
    $this->message->setHtmlbody($text);
  }
815824
public function setText($text)
    {
        $this->text = $text;
        $this->encodeManager->setData($text);

        return $this;
    }