add a proper file header

This commit is contained in:
Igor Wiedler 2011-12-10 12:31:13 +01:00
parent 8acbb48899
commit abd08ce5d7
2 changed files with 19 additions and 27 deletions

View File

@ -1,5 +1,14 @@
<?php
/*
* This file is part of JsonSchema.
*
* (c) Bruno Prieto Reis <bruno.p.reis@gmail.com>, Gradua Networks
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace JsonSchema;
class Undefined

View File

@ -1,35 +1,18 @@
<?php
/*
Copyright (c) 2008, Gradua Networks
Author: Bruno Prieto Reis
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the Gradua Networks nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Usage:
//this optional check mode may be set so that strings containing doubles or integers are
//validated ok against a schema defining an integer or a double.
//JsonSchema::$checkMode = JsonSchema::CHECK_MODE_TYPE_CAST;
$result = JsonSchema::validate(
$json,
$schema
);
* */
* This file is part of JsonSchema.
*
* (c) Bruno Prieto Reis <bruno.p.reis@gmail.com>, Gradua Networks
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace JsonSchema;
class Validator {
class Validator
{
public $checkMode = self::CHECK_MODE_NORMAL;
private $errors = array();