'
*
* @return mixed
*/
public function error(string $endOfLine = '
')
{
if( ! empty($this->error) )
{
if( is_array($this->error) )
{
return implode($endOfLine, $this->error);
}
return $this->error;
}
else
{
return false;
}
}
/**
* Classes that incorporate this feature include a structure that can hold success messages.
*
* @param string $endOfLine = '
'
*
* @return mixed
*/
public function success(string $endOfLine = '
')
{
if( empty($this->error) )
{
if( ! empty($this->success) )
{
if( is_array($this->success) )
{
return implode($endOfLine, $this->success);
}
return $this->success;
}
else
{
return Lang::default('ZN\CoreDefaultLanguage')::select('Success', 'success');
}
}
else
{
return false;
}
}
/**
* Classes that incorporate this feature include a structure that can hold error or success messages.
*
* @return mixed
*/
public function status()
{
if( $success = $this->success() )
{
return $success;
}
return $this->error();
}
}