Skip to content

Commit

Permalink
Merge pull request #72 from niden/master
Browse files Browse the repository at this point in the history
Phalcon v5.0.0-beta2
  • Loading branch information
Jeckerson authored Jan 6, 2022
2 parents f8aac42 + c198eb7 commit 2ac6f09
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/Forms/Element/AbstractElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
namespace Phalcon\Forms\Element;

use InvalidArgumentException;
use Phalcon\Di\DiInterface;
use Phalcon\Di\Di;
use Phalcon\Filter\Validation\ValidatorInterface;
use Phalcon\Forms\Form;
use Phalcon\Forms\Exception;
use Phalcon\Html\Escaper;
use Phalcon\Html\TagFactory;
use Phalcon\Messages\MessageInterface;
use Phalcon\Messages\Messages;
Expand Down
7 changes: 4 additions & 3 deletions src/Support/Helper/Str/Camelize.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@
namespace Phalcon\Support\Helper\Str;

/**
* Converts strings to camelize style
* Converts strings to upperCamelCase or lowerCamelCase
*/
class Camelize
class Camelize extends \Phalcon\Support\Helper\Str\PascalCase
{


/**
* @param string $text
* @param string|null $delimiters
* @param bool $lowerFirst
*
* @return string
*/
public function __invoke(string $text, string $delimiters = null): string
public function __invoke(string $text, string $delimiters = null, bool $lowerFirst = false): string
{
}
}
28 changes: 28 additions & 0 deletions src/Support/Helper/Str/KebabCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Support\Helper\Str;

/**
* Converts strings to kebab-case style
*/
class KebabCase extends \Phalcon\Support\Helper\Str\PascalCase
{


/**
* @param string $text
* @param string|null $delimiters
*
* @return string
*/
public function __invoke(string $text, string $delimiters = null): string
{
}
}
38 changes: 38 additions & 0 deletions src/Support/Helper/Str/PascalCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Support\Helper\Str;

/**
* Converts strings to PascalCase style
*/
class PascalCase
{


/**
* @param string $text
* @param string|null $delimiters
*
* @return string
*/
public function __invoke(string $text, string $delimiters = null): string
{
}

/**
* @param string $text
* @param string|null $delimiters
*
* @return array
*/
protected function processArray(string $text, string $delimiters = null): array
{
}
}
28 changes: 28 additions & 0 deletions src/Support/Helper/Str/SnakeCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Support\Helper\Str;

/**
* Converts strings to snake_case style
*/
class SnakeCase extends \Phalcon\Support\Helper\Str\PascalCase
{


/**
* @param string $text
* @param string|null $delimiters
*
* @return string
*/
public function __invoke(string $text, string $delimiters = null): string
{
}
}
5 changes: 5 additions & 0 deletions src/Support/HelperFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* @method string decode(string $data, bool $associative = false, int $depth = 512, int $options = 0)
* @method string encode($data, int $options = 0, int $depth = 512)
* @method bool between(int $value, int $start, int $end)
* @method string camelize(string $text, string $delimiters = null, bool $lowerFirst = false)
* @method string concat(string $delimiter, string $first, string $second, string ...$arguments)
* @method int countVowels(string $text)
* @method string decapitalize(string $text, bool $upperRest = false, string $encoding = 'UTF-8')
Expand All @@ -55,14 +56,18 @@
* @method bool isLower(string $text, string $encoding = 'UTF-8')
* @method bool isPalindrome(string $text)
* @method bool isUpper(string $text, string $encoding = 'UTF-8')
* @method string kebabCase(string $text, string $delimiters = null)
* @method int len(string $text, string $encoding = 'UTF-8')
* @method string lower(string $text, string $encoding = 'UTF-8')
* @method string pascalCase(string $text, string $delimiters = null)
* @method string prefix($text, string $prefix)
* @method string random(int $type = 0, int $length = 8)
* @method string reduceSlashes(string $text)
* @method bool startsWith(string $haystack, string $needle, bool $ignoreCase = true)
* @method string snakeCase(string $text, string $delimiters = null)
* @method string suffix($text, string $suffix)
* @method string ucwords(string $text, string $encoding = 'UTF-8')
* @method string uncamelize(string $text, string $delimiters = '_')
* @method string underscore(string $text)
* @method string upper(string $text, string $encoding = 'UTF-8')
*/
Expand Down

0 comments on commit 2ac6f09

Please sign in to comment.