Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 5 commits
  • 4 files changed
  • 0 commit comments
  • 2 contributors
View
1  Core/DependencyInjector.php
@@ -137,6 +137,7 @@ public static function getInstance()
public static function grab($name)
{
$self = self::getInstance();
+
return $self->get($name);
}
View
8 Core/Utility/BaseConverter.php
@@ -56,11 +56,12 @@ public static function newInstance()
* Set Charset (coverting to)
*
* @var mixed $charset - String of characters for converting to
- * @return \emberlabs\openflame\Utility\BaseConverter - Provides a fluent interface.
+ * @return \emberlabs\openflame\Core\Utility\BaseConverter - Provides a fluent interface.
*/
public function setCharsetTo($charset)
{
$this->charsetTo = is_array($charset) ? $charset : str_split((string) $charset);
+
return $this;
}
@@ -68,11 +69,12 @@ public function setCharsetTo($charset)
* Set Charset (coverting from)
*
* @var mixed $charset - String of characters for converting from.
- * @return \emberlabs\openflame\Utility\BaseConverter - Provides a fluent interface.
+ * @return \emberlabs\openflame\Core\Utility\BaseConverter - Provides a fluent interface.
*/
public function setCharsetFrom($charset)
{
$this->charsetFrom = is_array($charset) ? $charset : str_split((string) $charset);
+
return $this;
}
@@ -81,6 +83,8 @@ public function setCharsetFrom($charset)
*
* @param string - String to be decoded, must be within the charset of charsetTo.
* @return string - Base 10 representation of the number
+ *
+ * @throws OutOfRangeException
*/
public function decode($input)
{
View
2  Core/Utility/FormKey.php
@@ -68,7 +68,7 @@ public function getFormSeed()
/**
* Set the form seed to use for form key generation.
* @param string $seed - The seed to generate.
- * @return \emberlabs\openflame\Security\Form - Provides a fluent interface.
+ * @return \emberlabs\openflame\Core\Utility\FormKey - Provides a fluent interface.
* @note WARNING, it is not possible to alter the form seed once it has been set!
*
* @throws RuntimeException
View
6 Core/Utility/Seeder.php
@@ -45,7 +45,7 @@ public function getSessionSeed()
/**
* Set the session seed string to use for generating random strings/seeds
* @param string $seed - The session-specific seed to use for random string/seed generation.
- * @return \emberlabs\openflame\Security\Seeder - Provides a fluent interface.
+ * @return \emberlabs\openflame\Core\Utility\Seeder - Provides a fluent interface.
*/
public function setSessionSeed($seed)
{
@@ -66,7 +66,7 @@ public function getApplicationSeed()
/**
* Set the application seed string to use for generating random strings/seeds
* @param string $seed - The application-specific seed to use for random string/seed generation.
- * @return \emberlabs\openflame\Security\Seeder - Provides a fluent interface.
+ * @return \emberlabs\openflame\Core\Utility\Seeder - Provides a fluent interface.
*/
public function setApplicationSeed($seed)
{
@@ -113,6 +113,7 @@ public function buildRandomString($length = 12, $seed = '', $charset = '01234567
{
$return .= substr($string, 0, $length - strlen($return));
}
+
return $return;
}
@@ -122,6 +123,7 @@ public function buildRandomString($length = 12, $seed = '', $charset = '01234567
public function buildSeedString($algo = 'md5', $pad_length = 46, array $extra = array())
{
$hash = hash($algo, implode('', array_merge(array($this->getSessionSeed(), $this->getApplicationSeed()), $extra)));
+
return str_pad(implode('', array_map('hexdec', str_split($hash, 2))), (int) $pad_length, '0', STR_PAD_LEFT);
}
}

No commit comments for this range

Something went wrong with that request. Please try again.