--- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/github_19.0.3_ApiMethodInfo.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/client_ApiMethodInfo.php @@ -14 +14 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/github_19.0.3_Arr.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/client_Arr.php @@ -13 +13 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/github_19.0.3_Invalid.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/client_Invalid.php @@ -15 +15 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/github_19.0.3_Obj.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/client_Obj.php @@ -14 +14 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/github_19.0.3_Text.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/client_Text.php @@ -13 +13 @@ - * + * @version 3.0.0rc6 @@ -17,83 +17,79 @@ - /** - * Given haystack contains the needle or not? - * - * @param string $haystack - * @param string $needle - * @param bool $caseSensitive - * - * @return bool - */ - public static function contains($haystack, $needle, $caseSensitive = true) - { - if (empty($needle)) - return true; - return $caseSensitive - ? strpos($haystack, $needle) !== false - : stripos($haystack, $needle) !== false; - } - - /** - * Given haystack begins with the needle or not? - * - * @param string $haystack - * @param string $needle - * - * @return bool - */ - public static function beginsWith($haystack, $needle) - { - $length = strlen($needle); - return (substr($haystack, 0, $length) === $needle); - } - - /** - * Given haystack ends with the needle or not? - * - * @param string $haystack - * @param string $needle - * - * @return bool - */ - public static function endsWith($haystack, $needle) - { - $length = strlen($needle); - if ($length == 0) { - return true; - } - - // @CHANGE LDR - if (!is_string($haystack)) return false; - - return (substr($haystack, -$length) === $needle); - } - - - /** - * Convert camelCased or underscored string in to a title - * - * @param string $name - * - * @return string - */ - public static function title($name) - { - return - ucwords( - preg_replace( - array('/(?<=[^A-Z])([A-Z])/', '/(?<=[^0-9])([0-9])/', '/([_-])/', '/[^a-zA-Z0-9\s]|\s\s+/'), - array(' $0', ' $0', ' ', ' '), - $name - ) - ); - } - - /** - * Convert given string to be used as a slug or css class - * - * @param string $name - * @return string - */ - public static function slug($name) - { - return preg_replace('/[^a-zA-Z]+/', '-', strtolower(strip_tags($name))); - } + /** + * Given haystack contains the needle or not? + * + * @param string $haystack + * @param string $needle + * @param bool $caseSensitive + * + * @return bool + */ + public static function contains($haystack, $needle, $caseSensitive = true) + { + if (empty($needle)) + return true; + return $caseSensitive + ? strpos($haystack, $needle) !== false + : stripos($haystack, $needle) !== false; + } + + /** + * Given haystack begins with the needle or not? + * + * @param string $haystack + * @param string $needle + * + * @return bool + */ + public static function beginsWith($haystack, $needle) + { + $length = strlen($needle); + return (substr($haystack, 0, $length) === $needle); + } + + /** + * Given haystack ends with the needle or not? + * + * @param string $haystack + * @param string $needle + * + * @return bool + */ + public static function endsWith($haystack, $needle) + { + $length = strlen($needle); + if ($length == 0) { + return true; + } + return (substr($haystack, -$length) === $needle); + } + + + /** + * Convert camelCased or underscored string in to a title + * + * @param string $name + * + * @return string + */ + public static function title($name) + { + return + ucwords( + preg_replace( + array('/(?<=[^A-Z])([A-Z])/', '/(?<=[^0-9])([0-9])/', '/([_-])/', '/[^a-zA-Z0-9\s]|\s\s+/'), + array(' $0', ' $0', ' ', ' '), + $name + ) + ); + } + + /** + * Convert given string to be used as a slug or css class + * + * @param string $name + * @return string + */ + public static function slug($name) + { + return preg_replace('/[^a-zA-Z]+/', '-', strtolower(strip_tags($name))); + } --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/github_19.0.3_ValidationInfo.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/client_ValidationInfo.php @@ -18 +18 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/github_19.0.3_Validator.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/client_Validator.php @@ -21 +21 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/github_19.0.3_ValueObject.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/client_ValueObject.php @@ -14 +14 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/github_19.0.3_iValidate.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/client_iValidate.php @@ -13 +13 @@ - * + * @version 3.0.0rc6 --- /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/github_19.0.3_iValueObject.php +++ /tmp/dsg/dolibarr/htdocs/includes/restler/framework/Luracast/Restler/Data/client_iValueObject.php @@ -14 +14 @@ - * + * @version 3.0.0rc6