2017 © Pedro Peláez
 

library dz-framework

DZ Estúdio framework.

image

dzestudio/dz-framework

DZ Estúdio framework.

  • Wednesday, November 13, 2013
  • by lfbittencourt
  • Repository
  • 3 Watchers
  • 0 Stars
  • 247 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

DZ Framework

Build Status, (*1)

DZ Framework is an ultra little PHP classes package provided by DZ Estúdio. Its features are a hash generator and a geographic conversions class., (*2)

Components

Dz\Security\Hash

Hash generator class., (*3)

``` php <?php, (*4)

use \Dz\Security\Hash;, (*5)

// Let's say that user has filled these two variables. $email = 'example@example.com'; $password = 'mYs3cR3tP4S5W0Rd!';, (*6)

// Think about some reproducible salt schema... $saltBase = md5('Kynodontas#' . $email);, (*7)

// Now, let's hash! $hash = new Hash(array('saltBase' => $saltBase));, (*8)

// Save hash somewhere. $passwordHash = $hash->crypt($password);, (*9)

// Now, let's check. One more time, pretend that there's an user here! $emailInput = 'example@example.com'; $passwordInput = 'wR0NgP4S5W0Rd!';, (*10)

// Here is our reproducible salt schema. $saltBase = md5('Kynodontas#' . $emailInput); $hash = new Hash(array('saltBase' => $saltBase));, (*11)

if ($hash->check($passwordHash, $passwordInput)) { // Hashes match :-) } else { // Something wrong... }, (*12)


### Dz\Maps\Converter This class uses Google Maps API to convert addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739), which you can use to place markers or position a map. An example: ``` php <?php $address = 'Rua Vinte e Quatro de Outubro, 353'; $latLng = \Dz\Maps\Converter::fromAddressToLatLng($address); echo 'Latitude: ', $latLng->lat, PHP_EOL; echo 'Longitude: ', $latLng->lng, PHP_EOL;

You can use it to convert DMSs to decimals too:, (*13)

``` php <?php, (*14)

// Cachoeira do Sul DMS latitude $dmsLat = "30° 2' 54.0276'' S"; $decimalLat = \Dz\Maps\Converter::fromDmsToDecimal($dmsLat);, (*15)

echo 'Latitude: ', $decimalLat, PHP_EOL; ```, (*16)

The Versions

13/11 2013

dev-master

9999999-dev http://github.com/dzestudio/dz-framework

DZ Estúdio framework.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Adão Santos

hash geocode

24/10 2013

0.1.0

0.1.0.0 http://github.com/dzestudio/dz-framework

DZ Estúdio framework.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Adão Santos

hash geocode