public static function constructFromArray($props) {
        $notes = array();
        if (isset($props['notes'])) {
            foreach ($props['notes'] as $note) {
                if ($note instanceof Note) {
                    $notes[] = $note;
                } else {
                    $notes[] = Note::constructFromArray($note);
                }
            }
        }

        return new Chord($notes);

    }
public static function constructFromArray($props) {
        $notes = array();
        if (isset($props['notes'])) {
            foreach ($props['notes'] as $note) {
                if ($note instanceof Note) {
                    $notes[] = $note;
                } else {
                    $notes[] = Note::constructFromArray($note);
                }
            }
        }

        return new Chord($notes);

    }
public static function constructFromArray ( $ props ) { $ notes = array ( ) ; if ( isset ( $ props [ 'notes' ] ) ) { foreach ( $ props [ 'notes' ] as $ note ) { if ( $ note instanceof Note ) { $ notes [ ] = $ note ; } else { $ notes [ ] = Note :: constructFromArray ( $ note ) ; } } } return new Chord ( $ notes ) ; }
accepts the props object in the form of an array structure
accepts the props object in the form of an array structure