*/
public static function newFromJson( $json ) {
$restrictions = FormatJson::decode( $json, true );
*/
public static function newFromJson( $json ) {
$restrictions = FormatJson::decode( $json, true );
$keys = array_keys( $restrictions );
$invalidKeys = array_diff( $keys, $validKeys );
if ( $invalidKeys ) {
throw new InvalidArgumentException(
$keys = array_keys( $restrictions );
$invalidKeys = array_diff( $keys, $validKeys );
if ( $invalidKeys ) {
throw new InvalidArgumentException(
);
}
$missingKeys = array_diff( $neededKeys, $keys );
if ( $missingKeys ) {
throw new InvalidArgumentException(
);
}
$missingKeys = array_diff( $neededKeys, $keys );
if ( $missingKeys ) {
throw new InvalidArgumentException(
$status = Status::newGood();
$status->setResult( $ok === array_filter( $ok ), $ok );
return $status;
$status = Status::newGood();
$status->setResult( $ok === array_filter( $ok ), $ok );
return $status;